lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 28 Dec 2020 06:14:24 +0000
From:   Manish Rangankar <mrangankar@...vell.com>
To:     "trix@...hat.com" <trix@...hat.com>,
        Nilesh Javali <njavali@...vell.com>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>
CC:     GR-QLogic-Storage-Upstream <GR-QLogic-Storage-Upstream@...vell.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] scsi: qedi: add printf attribute to log function


> -----Original Message-----
> From: trix@...hat.com <trix@...hat.com>
> Sent: Monday, December 21, 2020 9:54 PM
> To: Nilesh Javali <njavali@...vell.com>; Manish Rangankar
> <mrangankar@...vell.com>; jejb@...ux.ibm.com;
> martin.petersen@...cle.com
> Cc: GR-QLogic-Storage-Upstream <GR-QLogic-Storage-
> Upstream@...vell.com>; linux-scsi@...r.kernel.org; linux-
> kernel@...r.kernel.org; Tom Rix <trix@...hat.com>
> Subject: [PATCH] scsi: qedi: add printf attribute to log function
> 
> From: Tom Rix <trix@...hat.com>
> 
> Attributing the function allows the compiler to more thoroughly check the
> use of the function with -Wformat and similar flags.
> 
> Signed-off-by: Tom Rix <trix@...hat.com>
> ---
>  drivers/scsi/qedi/qedi_dbg.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qedi/qedi_dbg.h b/drivers/scsi/qedi/qedi_dbg.h
> index 37d084086fd4..b2c9b0a2db6a 100644
> --- a/drivers/scsi/qedi/qedi_dbg.h
> +++ b/drivers/scsi/qedi/qedi_dbg.h
> @@ -78,13 +78,16 @@ struct qedi_dbg_ctx {
>  #define QEDI_INFO(pdev, level, fmt, ...)	\
>  		qedi_dbg_info(pdev, __func__, __LINE__, level, fmt,	\
>  			      ## __VA_ARGS__)
> -
> +__printf(4, 5)
>  void qedi_dbg_err(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
>  		  const char *fmt, ...);
> +__printf(4, 5)
>  void qedi_dbg_warn(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
>  		   const char *fmt, ...);
> +__printf(4, 5)
>  void qedi_dbg_notice(struct qedi_dbg_ctx *qedi, const char *func, u32
> line,
>  		     const char *fmt, ...);
> +__printf(5, 6)
>  void qedi_dbg_info(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
>  		   u32 info, const char *fmt, ...);
> 

Thanks,
Acked-by: Manish Rangankar <mrangankar@...vell.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ