From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:52002 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752886AbcHOO0D (ORCPT ); Mon, 15 Aug 2016 10:26:03 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u7FEJZBj129401 for ; Mon, 15 Aug 2016 10:26:02 -0400 Received: from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208]) by mx0a-001b2d01.pphosted.com with ESMTP id 24symnwgs0-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 15 Aug 2016 10:26:02 -0400 Received: from localhost by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 15 Aug 2016 10:26:01 -0400 Subject: Re: [PATCH 1/2] ses: use scsi_is_sas_rphy instead of is_sas_attached From: James Bottomley To: kbuild test robot , Johannes Thumshirn Cc: kbuild-all@01.org, "Martin K . Petersen" , Hannes Reinecke , Linux Kernel Mailinglist , Linux SCSI Mailinglist , stable@vger.kernel.org, #@suse.de, v4.5+@suse.de Date: Mon, 15 Aug 2016 07:25:53 -0700 In-Reply-To: <201608152258.TcR75AwO%fengguang.wu@intel.com> References: <201608152258.TcR75AwO%fengguang.wu@intel.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Message-Id: <1471271153.2428.5.camel@linux.vnet.ibm.com> Sender: stable-owner@vger.kernel.org List-ID: 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 --- diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 13c0b2b..0e1c50e 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h @@ -15,8 +15,13 @@ static inline int is_sas_attached(struct scsi_device *sdev) { return 0; } +static inline int scsi_is_sas_rphy(const struct device *) +{ + return 0; +} #else extern int is_sas_attached(struct scsi_device *sdev); +extern int scsi_is_sas_rphy(const struct device *); #endif static inline int sas_protocol_ata(enum sas_protocol proto) @@ -202,7 +207,6 @@ extern int sas_rphy_add(struct sas_rphy *); extern void sas_rphy_remove(struct sas_rphy *); extern void sas_rphy_delete(struct sas_rphy *); extern void sas_rphy_unlink(struct sas_rphy *); -extern int scsi_is_sas_rphy(const struct device *); struct sas_port *sas_port_alloc(struct device *, int); struct sas_port *sas_port_alloc_num(struct device *);