* [linux-next:master 3021/8423] drivers/scsi/qla2xxx/qla_edif.c:713:45: warning: taking address of packed member 'u' of class or structure 'auth_complete_cmd' may result in an unaligned pointer value
@ 2021-08-16 22:28 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-16 22:28 UTC (permalink / raw)
To: Quinn Tran
Cc: clang-built-linux, kbuild-all, Linux Memory Management List,
Martin K. Petersen, Hannes Reinecke, Himanshu Madhani,
Larry Wisneski, Duane Grigsby, Rick Hicksted Jr, Nilesh Javali
[-- Attachment #1: Type: text/plain, Size: 8012 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b9011c7e671dbbf59bb753283ddfd03f0c9eb865
commit: 8a4bb2c1dd623b5a71609de5b04ef3b5086b0a3e [3021/8423] scsi: qla2xxx: edif: Add authentication pass + fail bsgs
config: i386-randconfig-r023-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 44d0a99a12ec7ead4d2f5ef649ba05b40f6d463d)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8a4bb2c1dd623b5a71609de5b04ef3b5086b0a3e
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 8a4bb2c1dd623b5a71609de5b04ef3b5086b0a3e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
clang-14: warning: optimization flag '-falign-jumps=0' is not supported [-Wignored-optimization-argument]
In file included from drivers/scsi/qla2xxx/qla_edif.c:6:
In file included from drivers/scsi/qla2xxx/qla_def.h:12:
In file included from include/linux/module.h:14:
In file included from include/linux/buildid.h:5:
In file included from include/linux/mm_types.h:9:
In file included from include/linux/spinlock.h:51:
In file included from include/linux/preempt.h:78:
In file included from arch/x86/include/asm/preempt.h:7:
In file included from include/linux/thread_info.h:60:
arch/x86/include/asm/thread_info.h:172:13: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
oldframe = __builtin_frame_address(1);
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/thread_info.h:174:11: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
frame = __builtin_frame_address(2);
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_edif.c:463:6: warning: no previous prototype for function 'qla2x00_release_all_sadb' [-Wmissing-prototypes]
void qla2x00_release_all_sadb(struct scsi_qla_host *vha, struct fc_port *fcport)
^
drivers/scsi/qla2xxx/qla_edif.c:463:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void qla2x00_release_all_sadb(struct scsi_qla_host *vha, struct fc_port *fcport)
^
static
>> drivers/scsi/qla2xxx/qla_edif.c:713:45: warning: taking address of packed member 'u' of class or structure 'auth_complete_cmd' may result in an unaligned pointer value [-Waddress-of-packed-member]
fcport = qla2x00_find_fcport_by_pid(vha, &appplogiok.u.d_id);
^~~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_edif.c:822:45: warning: taking address of packed member 'u' of class or structure 'auth_complete_cmd' may result in an unaligned pointer value [-Waddress-of-packed-member]
fcport = qla2x00_find_fcport_by_pid(vha, &appplogifail.u.d_id);
^~~~~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_edif.c:1306:44: warning: taking address of packed member 'port_id' of class or structure 'qla_sa_update_frame' may result in an unaligned pointer value [-Waddress-of-packed-member]
fcport = qla2x00_find_fcport_by_pid(vha, &sa_frame.port_id);
^~~~~~~~~~~~~~~~
6 warnings generated.
vim +713 drivers/scsi/qla2xxx/qla_edif.c
682
683 /**
684 * qla_edif_app_authok - authentication by app succeeded. Driver can proceed
685 * with prli
686 * @vha: host adapter pointer
687 * @bsg_job: user request
688 */
689 static int
690 qla_edif_app_authok(scsi_qla_host_t *vha, struct bsg_job *bsg_job)
691 {
692 int32_t rval = 0;
693 struct auth_complete_cmd appplogiok;
694 struct app_plogi_reply appplogireply = {0};
695 struct fc_bsg_reply *bsg_reply = bsg_job->reply;
696 fc_port_t *fcport = NULL;
697 port_id_t portid = {0};
698
699 sg_copy_to_buffer(bsg_job->request_payload.sg_list,
700 bsg_job->request_payload.sg_cnt, &appplogiok,
701 sizeof(struct auth_complete_cmd));
702
703 switch (appplogiok.type) {
704 case PL_TYPE_WWPN:
705 fcport = qla2x00_find_fcport_by_wwpn(vha,
706 appplogiok.u.wwpn, 0);
707 if (!fcport)
708 ql_dbg(ql_dbg_edif, vha, 0x911d,
709 "%s wwpn lookup failed: %8phC\n",
710 __func__, appplogiok.u.wwpn);
711 break;
712 case PL_TYPE_DID:
> 713 fcport = qla2x00_find_fcport_by_pid(vha, &appplogiok.u.d_id);
714 if (!fcport)
715 ql_dbg(ql_dbg_edif, vha, 0x911d,
716 "%s d_id lookup failed: %x\n", __func__,
717 portid.b24);
718 break;
719 default:
720 ql_dbg(ql_dbg_edif, vha, 0x911d,
721 "%s undefined type: %x\n", __func__,
722 appplogiok.type);
723 break;
724 }
725
726 if (!fcport) {
727 SET_DID_STATUS(bsg_reply->result, DID_ERROR);
728 goto errstate_exit;
729 }
730
731 /*
732 * if port is online then this is a REKEY operation
733 * Only do sa update checking
734 */
735 if (atomic_read(&fcport->state) == FCS_ONLINE) {
736 ql_dbg(ql_dbg_edif, vha, 0x911d,
737 "%s Skipping PRLI complete based on rekey\n", __func__);
738 appplogireply.prli_status = 1;
739 SET_DID_STATUS(bsg_reply->result, DID_OK);
740 qla_edif_app_chk_sa_update(vha, fcport, &appplogireply);
741 goto errstate_exit;
742 }
743
744 /* make sure in AUTH_PENDING or else reject */
745 if (fcport->disc_state != DSC_LOGIN_AUTH_PEND) {
746 ql_dbg(ql_dbg_edif, vha, 0x911e,
747 "%s wwpn %8phC is not in auth pending state (%x)\n",
748 __func__, fcport->port_name, fcport->disc_state);
749 SET_DID_STATUS(bsg_reply->result, DID_OK);
750 appplogireply.prli_status = 0;
751 goto errstate_exit;
752 }
753
754 SET_DID_STATUS(bsg_reply->result, DID_OK);
755 appplogireply.prli_status = 1;
756 if (!(fcport->edif.rx_sa_set && fcport->edif.tx_sa_set)) {
757 ql_dbg(ql_dbg_edif, vha, 0x911e,
758 "%s: wwpn %8phC Both SA indexes has not been SET TX %d, RX %d.\n",
759 __func__, fcport->port_name, fcport->edif.tx_sa_set,
760 fcport->edif.rx_sa_set);
761 SET_DID_STATUS(bsg_reply->result, DID_OK);
762 appplogireply.prli_status = 0;
763 goto errstate_exit;
764
765 } else {
766 ql_dbg(ql_dbg_edif, vha, 0x911e,
767 "%s wwpn %8phC Both SA(s) updated.\n", __func__,
768 fcport->port_name);
769 fcport->edif.rx_sa_set = fcport->edif.tx_sa_set = 0;
770 fcport->edif.rx_sa_pending = fcport->edif.tx_sa_pending = 0;
771 }
772
773 if (qla_ini_mode_enabled(vha)) {
774 ql_dbg(ql_dbg_edif, vha, 0x911e,
775 "%s AUTH complete - RESUME with prli for wwpn %8phC\n",
776 __func__, fcport->port_name);
777 qla_edif_reset_auth_wait(fcport, DSC_LOGIN_PEND, 1);
778 qla24xx_post_prli_work(vha, fcport);
779 }
780
781 errstate_exit:
782 bsg_job->reply_len = sizeof(struct fc_bsg_reply);
783 sg_copy_from_buffer(bsg_job->reply_payload.sg_list,
784 bsg_job->reply_payload.sg_cnt, &appplogireply,
785 sizeof(struct app_plogi_reply));
786
787 return rval;
788 }
789
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37808 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-16 22:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16 22:28 [linux-next:master 3021/8423] drivers/scsi/qla2xxx/qla_edif.c:713:45: warning: taking address of packed member 'u' of class or structure 'auth_complete_cmd' may result in an unaligned pointer value kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).