Commit 2771f8ac authored by Joe Perches's avatar Joe Perches Committed by Wang Wensheng
Browse files

scsi: mpt3sas: Add ioc_<level> logging macros

stable inclusion
from stable-v4.19.317
commit 229e75730c784f7b871ae9bd76f8bd506d20a304
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IACZL6
CVE: CVE-2024-40901

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=229e75730c784f7b871ae9bd76f8bd506d20a304



--------------------------------

[ Upstream commit 645a20c6 ]

These macros can help identify specific logging uses and eventually perhaps
reduce object sizes.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarSuganath Prabu <suganath-prabu.subramani@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Stable-dep-of: 4254dfeda82f ("scsi: mpt3sas: Avoid test/set_bit() operating in non-allocated memory")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarWang Wensheng <wangwensheng4@huawei.com>
parent d50ae624
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -160,6 +160,15 @@ struct mpt3sas_nvme_cmd {
 */
#define MPT3SAS_FMT			"%s: "

#define ioc_err(ioc, fmt, ...)						\
	pr_err("%s: " fmt, (ioc)->name, ##__VA_ARGS__)
#define ioc_notice(ioc, fmt, ...)					\
	pr_notice("%s: " fmt, (ioc)->name, ##__VA_ARGS__)
#define ioc_warn(ioc, fmt, ...)						\
	pr_warn("%s: " fmt, (ioc)->name, ##__VA_ARGS__)
#define ioc_info(ioc, fmt, ...)						\
	pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__)

/*
 *  WarpDrive Specific Log codes
 */