From: Gleb C. <lna...@ya...> - 2025-08-05 15:22:44
|
Commit: 07f82d9 GitHub URL: https://github.com/SCST-project/scst/commit/07f82d9505804eb2abed48de8013cb0f347f280d Author: Gleb Chesnokov Date: 2025-08-05T18:15:49+03:00 Log Message: ----------- qla2x00t-32gbit: Remove unused ql_log_qp ql_log_qp() was added in 2017 as part of commit 22d84726e3b8 ("scsi: qla2xxx: Add debug logging routine for qpair") but has remained unused. Remove it. (That patch also added ql_dbg_qp but that is still used so is left in). Signed-off-by: Dr. David Alan Gilbert <li...@tr...> Link: https://lore.kernel.org/r/202...@tr... Signed-off-by: Martin K. Petersen <mar...@or...> [ commit 33f44a50ca61 upstream ] Modified Paths: -------------- qla2x00t-32gbit/qla_dbg.c | 58 --------------- qla2x00t-32gbit/qla_dbg.h | 3 - 2 files changed, 61 deletions(-) =================================================================== diff --git a/qla2x00t-32gbit/qla_dbg.c b/qla2x00t-32gbit/qla_dbg.c index 9de6e3a..fb3a8ba 100644 --- a/qla2x00t-32gbit/qla_dbg.c +++ b/qla2x00t-32gbit/qla_dbg.c @@ -2735,64 +2735,6 @@ ql_dump_buffer(uint level, scsi_qla_host_t *vha, uint id, const void *buf, } } -/* - * This function is for formatting and logging log messages. - * It is to be used when vha is available. It formats the message - * and logs it to the messages file. All the messages will be logged - * irrespective of value of ql2xextended_error_logging. - * parameters: - * level: The level of the log messages to be printed in the - * messages file. - * vha: Pointer to the scsi_qla_host_t - * id: This is a unique id for the level. It identifies the - * part of the code from where the message originated. - * msg: The message to be displayed. - */ -void -ql_log_qp(uint32_t level, struct qla_qpair *qpair, int32_t id, - const char *fmt, ...) -{ - va_list va; - struct va_format vaf; - char pbuf[128]; - - if (level > ql_errlev) - return; - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0) - ql_ktrace(0, level, pbuf, NULL, qpair ? qpair->vha : NULL, id, fmt); - - if (!pbuf[0]) /* set by ql_ktrace */ - ql_dbg_prefix(pbuf, ARRAY_SIZE(pbuf), NULL, - qpair ? qpair->vha : NULL, id); -#else - ql_dbg_prefix(pbuf, ARRAY_SIZE(pbuf), NULL, qpair ? qpair->vha : NULL, id); - -#endif - - va_start(va, fmt); - - vaf.fmt = fmt; - vaf.va = &va; - - switch (level) { - case ql_log_fatal: /* FATAL LOG */ - pr_crit("%s%pV", pbuf, &vaf); - break; - case ql_log_warn: - pr_err("%s%pV", pbuf, &vaf); - break; - case ql_log_info: - pr_warn("%s%pV", pbuf, &vaf); - break; - default: - pr_info("%s%pV", pbuf, &vaf); - break; - } - - va_end(va); -} - /* * This function is for formatting and logging debug information. * It is to be used when vha is available. It formats the message diff --git a/qla2x00t-32gbit/qla_dbg.h b/qla2x00t-32gbit/qla_dbg.h index ecdc747..121a035 100644 --- a/qla2x00t-32gbit/qla_dbg.h +++ b/qla2x00t-32gbit/qla_dbg.h @@ -334,9 +334,6 @@ ql_log(uint, scsi_qla_host_t *vha, uint, const char *fmt, ...); void __attribute__((format (printf, 4, 5))) ql_log_pci(uint, struct pci_dev *pdev, uint, const char *fmt, ...); -void __attribute__((format (printf, 4, 5))) -ql_log_qp(uint32_t, struct qla_qpair *, int32_t, const char *fmt, ...); - /* Debug Levels */ /* The 0x40000000 is the max value any debug level can have * as ql2xextended_error_logging is of type signed int |