qcom: icnss: Address compiler warning

Compiler complaint about destination buffer size.
We'll increase the buf size from 2 to 6.

../drivers/soc/qcom/icnss.c:3959:2: warning: 'sprintf' will always overflow; destination buffer has size 2, but format string expands to at least 4 [-Wfortify-source]
        sprintf(antbuffer, "%c%c\n", (gpio_get_value(wifi_cable1) > 0) ? 'D' : 'E' , (gpio_get_value(wifi_cable2) > 0) ? 'D' : 'E');
        ^
  CC      drivers/usb/core/config.o
  CC      drivers/usb/dwc3/debug_ipc.o
1 warning generated.

Signed-off-by: rsuntk <rissu.ntk@gmail.com>
This commit is contained in:
rsuntk 2025-03-11 11:35:27 +00:00
parent b74b6638c6
commit 2dec69506d

View file

@ -3938,7 +3938,7 @@ static ssize_t show_wificableinfo(struct kobject *kobj,
struct device_node *np;
int wifi_cable1 = 0;
int wifi_cable2 = 0;
char antbuffer[2] = {0};
char antbuffer[6] = {0};
np = of_find_compatible_node(NULL, NULL, "samsung,rome_cable");