Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] scsi: bfa: missing char* cast for host_machine_name causes -Wformat 
warning
--

commit e9ab2501ca8e083742e7d8a4f33a0d89bbb70aad
Author: Bill Wendling <[email protected]>

scsi: bfa: Use snprintf() in bfa_fcs_fabric_nsymb_init()

This commit replaces chained strscpy() and strlcat() calls with a single
snprintf() call when constructing the node symbolic name.

Link: https://github.com/KSPP/linux/issues/370 [1]

> diff --git a/drivers/scsi/bfa/bfa_fcs.c b/drivers/scsi/bfa/bfa_fcs.c
> index 9b57312f43f50..7a4e0e8c7182d 100644
> --- a/drivers/scsi/bfa/bfa_fcs.c
> +++ b/drivers/scsi/bfa/bfa_fcs.c
[ ... ]
> @@ -821,30 +821,13 @@ bfa_fcs_fabric_nsymb_init(struct bfa_fcs_fabric_s 
> *fabric)
[ ... ]
> -     /* null terminate */
> -     port_cfg->node_sym_name.symname[BFA_SYMNAME_MAXLEN - 1] = 0;
> +     /* Model name/number, Driver Version, Host machine name */
> +     snprintf(port_cfg->node_sym_name.symname, BFA_SYMNAME_MAXLEN,
> +              "%s" BFA_FCS_PORT_SYMBNAME_SEPARATOR
> +              "%s" BFA_FCS_PORT_SYMBNAME_SEPARATOR
> +              "%s" BFA_FCS_PORT_SYMBNAME_SEPARATOR,
> +              model, (char *)driver_info->version,
> +              driver_info->host_machine_name);

[Severity: Low]
Does this missing cast create a -Wformat compiler warning?

Looking at bfa_fcs_fabric_nsymb_init(), host_machine_name is passed to the
%s format specifier without an explicit (char *) cast, while version on the
preceding line includes one.

Does this cause a type mismatch warning since host_machine_name is an
unsigned char array?

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

Reply via email to