Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1462880 > unrolled thread
| Started by | Johannes Thumshirn <jthumshirn@suse.de> |
|---|---|
| First post | 2016-08-15 17:20 +0200 |
| Last post | 2016-08-15 19:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 1/3] sas: provide stub implementations for scsi_is_sas_phy and sas_get_address Johannes Thumshirn <jthumshirn@suse.de> - 2016-08-15 17:20 +0200
Re: [PATCH v2 1/3] sas: provide stub implementations for scsi_is_sas_phy and sas_get_address James Bottomley <jejb@linux.vnet.ibm.com> - 2016-08-15 19:20 +0200
| From | Johannes Thumshirn <jthumshirn@suse.de> |
|---|---|
| Date | 2016-08-15 17:20 +0200 |
| Subject | [PATCH v2 1/3] sas: provide stub implementations for scsi_is_sas_phy and sas_get_address |
| Message-ID | <s6rQe-7ef-3@gated-at.bofh.it> |
Provide stub implementations for scsi_is_sas_phy and sas_get_address
for kernel configurations which do not have CONFIG_SCSI_SAS_ATTRS
defined.
Reported-by: kbuild test robot <lkp@intel.com>
Suggested-by: James Bottomley <jejb@linux.vnet.ibm.com>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
include/scsi/scsi_transport_sas.h | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h
index 13c0b2b..0fc648e 100644
--- a/include/scsi/scsi_transport_sas.h
+++ b/include/scsi/scsi_transport_sas.h
@@ -15,8 +15,20 @@ static inline int is_sas_attached(struct scsi_device *sdev)
{
return 0;
}
+
+static inline int scsi_is_sas_phy(const struct device *sdev)
+{
+ return 0;
+}
+
+static inline u64 sas_get_address(struct scsi_device *sdev)
+{
+ return 0;
+}
#else
extern int is_sas_attached(struct scsi_device *sdev);
+extern int scsi_is_sas_phy(const struct device *);
+u64 sas_get_address(struct scsi_device *);
#endif
static inline int sas_protocol_ata(enum sas_protocol proto)
@@ -187,9 +199,7 @@ extern struct sas_phy *sas_phy_alloc(struct device *, int);
extern void sas_phy_free(struct sas_phy *);
extern int sas_phy_add(struct sas_phy *);
extern void sas_phy_delete(struct sas_phy *);
-extern int scsi_is_sas_phy(const struct device *);
-u64 sas_get_address(struct scsi_device *);
unsigned int sas_tlr_supported(struct scsi_device *);
unsigned int sas_is_tlr_enabled(struct scsi_device *);
void sas_disable_tlr(struct scsi_device *);
--
1.8.5.6
[toc] | [next] | [standalone]
| From | James Bottomley <jejb@linux.vnet.ibm.com> |
|---|---|
| Date | 2016-08-15 19:20 +0200 |
| Subject | Re: [PATCH v2 1/3] sas: provide stub implementations for scsi_is_sas_phy and sas_get_address |
| Message-ID | <s6tIm-8po-1@gated-at.bofh.it> |
| In reply to | #1462880 |
On Mon, 2016-08-15 at 17:12 +0200, Johannes Thumshirn wrote:
> +static inline u64 sas_get_address(struct scsi_device *sdev)
> +{
> + return 0;
> +}
To be honest, we don't want this. We do want the code to fail to
compile if you ever use sas_get_address where you shouldn't because the
code will be incorrect at that point. If we could return an error,
fine, but we just return the address.
James
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web