All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fc: fix fpin_els build breakage
@ 2020-02-13 22:40 James Smart
  2020-02-14  7:33 ` Hannes Reinecke
  0 siblings, 1 reply; 2+ messages in thread
From: James Smart @ 2020-02-13 22:40 UTC (permalink / raw)
  To: linux-scsi; +Cc: James.Bottomley, martin.petersen, 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':
>> ./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)
       ^
>> ./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().

Signed-off-by: James Smart <jsmart2021@gmail.com>
Reported-by: kbuild test robot <lkp@intel.com>
---
 include/uapi/scsi/fc/fc_els.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/scsi/fc/fc_els.h b/include/uapi/scsi/fc/fc_els.h
index 10b609a2f863..66318c44acd7 100644
--- a/include/uapi/scsi/fc/fc_els.h
+++ b/include/uapi/scsi/fc/fc_els.h
@@ -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.
-- 
2.13.7


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fc: fix fpin_els build breakage
  2020-02-13 22:40 [PATCH] fc: fix fpin_els build breakage James Smart
@ 2020-02-14  7:33 ` Hannes Reinecke
  0 siblings, 0 replies; 2+ messages in thread
From: Hannes Reinecke @ 2020-02-14  7:33 UTC (permalink / raw)
  To: James Smart, linux-scsi; +Cc: James.Bottomley, martin.petersen

On 2/13/20 11:40 PM, James Smart wrote:
> 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':
>>> ./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)
>        ^
>>> ./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().
> 
> Signed-off-by: James Smart <jsmart2021@gmail.com>
> Reported-by: kbuild test robot <lkp@intel.com>
> ---
>  include/uapi/scsi/fc/fc_els.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/uapi/scsi/fc/fc_els.h b/include/uapi/scsi/fc/fc_els.h
> index 10b609a2f863..66318c44acd7 100644
> --- a/include/uapi/scsi/fc/fc_els.h
> +++ b/include/uapi/scsi/fc/fc_els.h
> @@ -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.
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		           Kernel Storage Architect
hare@suse.de			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-14  7:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 22:40 [PATCH] fc: fix fpin_els build breakage James Smart
2020-02-14  7:33 ` Hannes Reinecke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.