From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Bottomley Subject: Re: [PATCH 1/2] ses: use scsi_is_sas_rphy instead of is_sas_attached Date: Mon, 15 Aug 2016 07:59:25 -0700 Message-ID: <1471273165.2428.7.camel@linux.vnet.ibm.com> References: <201608152258.TcR75AwO%fengguang.wu@intel.com> <1471271153.2428.5.camel@linux.vnet.ibm.com> <20160815144027.eriee5acsrxsrd52@c203.arch.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20160815144027.eriee5acsrxsrd52@c203.arch.suse.de> Sender: linux-kernel-owner@vger.kernel.org To: Johannes Thumshirn Cc: kbuild test robot , kbuild-all@01.org, "Martin K . Petersen" , Hannes Reinecke , Linux Kernel Mailinglist , Linux SCSI Mailinglist , stable@vger.kernel.org List-Id: linux-scsi@vger.kernel.org On Mon, 2016-08-15 at 16:40 +0200, Johannes Thumshirn wrote: > On Mon, Aug 15, 2016 at 07:25:53AM -0700, James Bottomley wrote: > > On Mon, 2016-08-15 at 22:11 +0800, kbuild test robot wrote: > > > Hi Johannes, > > > > > > [auto build test ERROR on scsi/for-next] > > > [also build test ERROR on v4.8-rc2 next-20160815] > > > [if your patch is applied to the wrong git tree, please drop us a > > > note to help improve the system] > > > > This is happening because scsi_is_sas_rphy wasn't designed to be > > used outside the SAS transport class, so it's failing when the > > ATTRs aren't defined. > > > > This is the way you fix it (needs to be a precursor patch to 1/2): > > > > James > > Thanks, but I'm wondering about the call to sas_get_address(). It was > there before the patch as well and now it's an undefined reference. > Am I missing something here? Sure it can be guarded in the #if block. Yes: gcc is kind enough to elide any code that looks like if (0) { refer to something } So the static inline ensures anything within the brace isn't used as a linkable reference. James