Thank you for your contribution! Sashiko AI review found 2 potential issue(s) 
to consider:
- [Medium] drm/panel: dsi-bpf: panel_bpf_mipi_dsi_dcs_write_byte macro prevents 
error handling
- [Low] build: Makefile misses vmlinux.h in clean target and uses undefined 
variable
--

commit 94b9d5177a6ef3a698ad45fa764e652b0d0dbae4
Author: Maxime Ripard <[email protected]>

drm/panel: dsi-bpf: Add BPF program build infrastructure and helper header

Add the BPF-side header panel-bpf-mipi-dsi.h and a standalone
Makefile for building panel BPF programs. The header provides
section name macros (PANEL_BPF_MIPI_DSI_PREPARE, etc.), the
PANEL_BPF_MIPI_DSI_OPS() struct_ops declaration macro, extern
declarations for all the kfuncs, and some convenience macros.

> diff --git a/drivers/gpu/drm/panel/bpf/progs/Makefile 
> b/drivers/gpu/drm/panel/bpf/progs/Makefile
> new file mode 100644
> index 0000000000000..74190ee618abd
> --- /dev/null
> +++ b/drivers/gpu/drm/panel/bpf/progs/Makefile
[ ... ]
> +clean:
> +     $(call msg,CLEAN)
> +     $(Q)rm -rf $(OUTPUT) $(TARGETS)

[Severity: Low]
Will this clean target leave a dirty working tree? The generated vmlinux.h
artifact is not removed when executing make clean.

> +
> +%.bpf.o: %.bpf.c vmlinux.h $(BPFOBJ) | $(OUTPUT)
> +     $(call msg,BPF,$@)
> +     $(Q)$(CLANG) -g -O2 --target=bpf -Wall -Werror $(INCLUDES)              
> \
> +                  -Wno-microsoft-anon-tag                                    
> \
> +                  -fms-extensions                                            
> \
> +                  -c $(filter %.c,$^) -o $@ &&                               
> \
> +     $(LLVM_STRIP) -g $@
> +
> +vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL) | $(INCLUDE_DIR)

[Severity: Low]
Is the INCLUDE_DIR order-only dependency defined? It appears to resolve to
an empty string since it is not defined in this Makefile.

[ ... ]
> diff --git a/drivers/gpu/drm/panel/bpf/progs/panel-bpf-mipi-dsi.h 
> b/drivers/gpu/drm/panel/bpf/progs/panel-bpf-mipi-dsi.h
> new file mode 100644
> index 0000000000000..e2b03afef2c8c
> --- /dev/null
> +++ b/drivers/gpu/drm/panel/bpf/progs/panel-bpf-mipi-dsi.h
[ ... ]
> +/* Send a DCS command with a single byte payload. */
> +#define panel_bpf_mipi_dsi_dcs_write_byte(ctx, cmd, val)             \
> +     do {                                                            \
> +             const __u8 _v = (val);                                  \
> +             panel_bpf_mipi_dsi_dcs_write((ctx), (cmd), &_v, 1);     \
> +     } while (0)

[Severity: Medium]
Could the panel_bpf_mipi_dsi_dcs_write_byte macro prevent callers from
checking for and handling DSI transmission errors?

By wrapping panel_bpf_mipi_dsi_dcs_write in a do-while loop, the integer
return value is dropped. This causes initialization routines to blindly proceed
even if the panel is detached or unresponsive, as BPF programs invoking this
macro cannot assign or evaluate its result.

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=3

Reply via email to