Skip to contentSkip to conversation

fc: fix fpin_els build breakage

PATCH In review James Smart 2 participants 2 messages Feb 13, 2020 – Feb 14, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fc: fix fpin_els build breakage

Kbuild reported the following error:

All error/warnings (new ones prefixed by >>):

In file included from <command-line>:32:0:
./usr/include/scsi/fc/fc_els.h: In function 'fc_tlv_next_desc':

Quoted 1 line
Quoted 1 line

./usr/include/scsi/fc/fc_els.h:274:4: error: implicit declaration of

    function 'be32_to_cpu'; did you mean '__be32_to_cpu'?
    [-Werror=implicit-function-declaration]
      (be32_to_cpu((tlv)->desc_len) + FC_TLV_DESC_HDR_SZ)
       ^
Quoted 1 line
Quoted 1 line

./usr/include/scsi/fc/fc_els.h:286:17: note: in expansion of macro

    'FC_TLV_DESC_SZ_FROM_LENGTH'
     return (desc + FC_TLV_DESC_SZ_FROM_LENGTH(tlv));
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~

cc1: some warnings being treated as errors

Fix by converting fc_tlv_next_desc to use __be32_to_cpu().

---
 include/uapi/scsi/fc/fc_els.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/scsi/fc/fc_els.h +1 -1
index 10b609a2f863..66318c44acd7 100644
@@ -271,7 +271,7 @@ struct fc_tlv_desc {
 
 /* Macro, used on received payloads, to return the descriptor length */
 #define FC_TLV_DESC_SZ_FROM_LENGTH(tlv)		\
-		(be32_to_cpu((tlv)->desc_len) + FC_TLV_DESC_HDR_SZ)
+		(__be32_to_cpu((tlv)->desc_len) + FC_TLV_DESC_HDR_SZ)
 
 /*
  * This helper is used to walk descriptors in a descriptor list.
Signature · 1 line
2.13.7
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 31 lines · James Smart

Kbuild reported the following error:

All error/warnings (new ones prefixed by >>):

In file included from <command-line>:32:0:
./usr/include/scsi/fc/fc_els.h: In function 'fc_tlv_next_desc':

Quoted 1 line
Quoted 1 line

./usr/include/scsi/fc/fc_els.h:274:4: error: implicit declaration of

    function 'be32_to_cpu'; did you mean '__be32_to_cpu'?
    [-Werror=implicit-function-declaration]
      (be32_to_cpu((tlv)->desc_len) + FC_TLV_DESC_HDR_SZ)
       ^
Quoted 1 line
Quoted 1 line

./usr/include/scsi/fc/fc_els.h:286:17: note: in expansion of macro

    'FC_TLV_DESC_SZ_FROM_LENGTH'
     return (desc + FC_TLV_DESC_SZ_FROM_LENGTH(tlv));
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~

cc1: some warnings being treated as errors

Fix by converting fc_tlv_next_desc to use __be32_to_cpu().

---
 include/uapi/scsi/fc/fc_els.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/scsi/fc/fc_els.h +0 -0
index 10b609a2f863..66318c44acd7 100644

include/uapi/scsi/fc/fc_els.h struct fc_tlv_desc { · line 277

Quoted 8 lines
include/uapi/scsi/fc/fc_els.h +1 -1
@@ -271,7 +271,7 @@ struct fc_tlv_desc {
 
 /* Macro, used on received payloads, to return the descriptor length */
 #define FC_TLV_DESC_SZ_FROM_LENGTH(tlv)		\
-		(be32_to_cpu((tlv)->desc_len) + FC_TLV_DESC_HDR_SZ)
+		(__be32_to_cpu((tlv)->desc_len) + FC_TLV_DESC_HDR_SZ)
 
 /*
  * This helper is used to walk descriptors in a descriptor list.

Cheers,

Hannes

Signature · 4 lines
Dr. Hannes Reinecke		           Kernel Storage Architect
[email protected]			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer