fc: fix fpin_els build breakage
Subsystems (2)
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
@@ -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
Quoted 31 lines · James Smart
Kbuildreported 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 offunction '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_descto use__be32_to_cpu().Signed-off-by James Smart <[email protected]>Reported-by kbuild test robot <[email protected]>--- include/uapi/scsi/fc/fc_els.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/uapi/scsi/fc/fc_els.h +0
-0
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