All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Sumit Saxena <sumit.saxena@broadcom.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build failure after merge of the scsi-mkp tree
Date: Wed, 27 Apr 2022 18:28:53 +1000	[thread overview]
Message-ID: <20220427182853.2587e788@canb.auug.org.au> (raw)
In-Reply-To: <CAL2rwxpdHGuFKCEJmOVOx-p3ri8_PLFqCDJm_5Ar6D66iQ-W9Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5730 bytes --]

Hi Sumit,

On Wed, 27 Apr 2022 13:10:57 +0530 Sumit Saxena <sumit.saxena@broadcom.com> wrote:
>
> Could you please try if the below patch fixes this build failure:
> 
> From: Sumit Saxena <sumit.saxena@broadcom.com>
> Date: Wed, 27 Apr 2022 03:35:34 -0400
> Subject: [PATCH] uapi: include <linux/types.h> header in scsi_bsg_mpi3mr.h
> 
> Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
> ---
>  include/uapi/scsi/scsi_bsg_mpi3mr.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/uapi/scsi/scsi_bsg_mpi3mr.h
> b/include/uapi/scsi/scsi_bsg_mpi3mr.h
> index 46c33efcff19..a0ddad7d84f7 100644
> --- a/include/uapi/scsi/scsi_bsg_mpi3mr.h
> +++ b/include/uapi/scsi/scsi_bsg_mpi3mr.h
> @@ -10,6 +10,8 @@
>  #ifndef SCSI_BSG_MPI3MR_H_INCLUDED
>  #define SCSI_BSG_MPI3MR_H_INCLUDED
> 
> +#include <linux/types.h>
> +
>  /* Definitions for BSG commands */
>  #define MPI3MR_IOCTL_VERSION                   0x06

It does not, because the uapi headers should only use the __ prefixed
versions of the kernel data types (u8 etc) and need to include
stdint.h in the not __KERNEL__ case for unint8_t etc.

So ... (this needs white space cleanups - you should probably use TAB
characters before the field names.)

diff --git a/include/uapi/scsi/scsi_bsg_mpi3mr.h b/include/uapi/scsi/scsi_bsg_mpi3mr.h
index 6d866256f924..5167d4da478a 100644
--- a/include/uapi/scsi/scsi_bsg_mpi3mr.h
+++ b/include/uapi/scsi/scsi_bsg_mpi3mr.h
@@ -10,6 +10,11 @@
 #ifndef SCSI_BSG_MPI3MR_H_INCLUDED
 #define SCSI_BSG_MPI3MR_H_INCLUDED
 
+#ifndef __KERNEL__
+#include <stdint.h>
+#endif
+#include <linux/types.h>
+
 /* Definitions for BSG commands */
 #define MPI3MR_IOCTL_VERSION			0x06
 
@@ -94,12 +99,12 @@ enum command {
  */
 struct mpi3_driver_info_layout {
 	__le32             information_length;
-	u8                 driver_signature[12];
-	u8                 os_name[16];
-	u8                 os_version[12];
-	u8                 driver_name[20];
-	u8                 driver_version[32];
-	u8                 driver_release_date[20];
+	__u8                 driver_signature[12];
+	__u8                 os_name[16];
+	__u8                 os_version[12];
+	__u8                 driver_name[20];
+	__u8                 driver_version[32];
+	__u8                 driver_release_date[20];
 	__le32             driver_capabilities;
 };
 
@@ -461,11 +466,11 @@ struct mpi3mr_bsg_packet {
 
 struct mpi3_nvme_encapsulated_request {
 	__le16                     host_tag;
-	u8                         ioc_use_only02;
-	u8                         function;
+	__u8                         ioc_use_only02;
+	__u8                         function;
 	__le16                     ioc_use_only04;
-	u8                         ioc_use_only06;
-	u8                         msg_flags;
+	__u8                         ioc_use_only06;
+	__u8                         msg_flags;
 	__le16                     change_count;
 	__le16                     dev_handle;
 	__le16                     encapsulated_command_length;
@@ -477,11 +482,11 @@ struct mpi3_nvme_encapsulated_request {
 
 struct mpi3_nvme_encapsulated_error_reply {
 	__le16                     host_tag;
-	u8                         ioc_use_only02;
-	u8                         function;
+	__u8                         ioc_use_only02;
+	__u8                         function;
 	__le16                     ioc_use_only04;
-	u8                         ioc_use_only06;
-	u8                         msg_flags;
+	__u8                         ioc_use_only06;
+	__u8                         msg_flags;
 	__le16                     ioc_use_only08;
 	__le16                     ioc_status;
 	__le32                     ioc_log_info;
@@ -499,20 +504,20 @@ struct mpi3_nvme_encapsulated_error_reply {
 /* MPI3: task management related definitions */
 struct mpi3_scsi_task_mgmt_request {
 	__le16                     host_tag;
-	u8                         ioc_use_only02;
-	u8                         function;
+	__u8                         ioc_use_only02;
+	__u8                         function;
 	__le16                     ioc_use_only04;
-	u8                         ioc_use_only06;
-	u8                         msg_flags;
+	__u8                         ioc_use_only06;
+	__u8                         msg_flags;
 	__le16                     change_count;
 	__le16                     dev_handle;
 	__le16                     task_host_tag;
-	u8                         task_type;
-	u8                         reserved0f;
+	__u8                         task_type;
+	__u8                         reserved0f;
 	__le16                     task_request_queue_id;
 	__le16                     reserved12;
 	__le32                     reserved14;
-	u8                         lun[8];
+	__u8                         lun[8];
 };
 
 #define MPI3_SCSITASKMGMT_MSGFLAGS_DO_NOT_SEND_TASK_IU      (0x08)
@@ -528,11 +533,11 @@ struct mpi3_scsi_task_mgmt_request {
 #define MPI3_SCSITASKMGMT_TASKTYPE_I_T_NEXUS_RESET          (0x0b)
 struct mpi3_scsi_task_mgmt_reply {
 	__le16                     host_tag;
-	u8                         ioc_use_only02;
-	u8                         function;
+	__u8                         ioc_use_only02;
+	__u8                         function;
 	__le16                     ioc_use_only04;
-	u8                         ioc_use_only06;
-	u8                         msg_flags;
+	__u8                         ioc_use_only06;
+	__u8                         msg_flags;
 	__le16                     ioc_use_only08;
 	__le16                     ioc_status;
 	__le32                     ioc_log_info;

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-04-27  8:29 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27  3:38 linux-next: build failure after merge of the scsi-mkp tree Stephen Rothwell
2022-04-27  7:40 ` Sumit Saxena
2022-04-27  8:28   ` Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-12  5:46 Stephen Rothwell
2024-04-12  6:09 ` Christoph Hellwig
2024-04-12 10:22   ` Martin K. Petersen
2024-04-12 10:44     ` Martin K. Petersen
2024-03-27  2:45 Stephen Rothwell
2024-03-28  0:18 ` Martin K. Petersen
2023-08-22  5:32 Stephen Rothwell
2023-08-23 22:55 ` Stephen Rothwell
2023-08-23 22:59   ` Martin K. Petersen
2023-06-15  3:43 Stephen Rothwell
2023-06-15  4:19 ` Damien Le Moal
2023-06-16 16:51   ` Martin K. Petersen
2023-01-16  2:24 Stephen Rothwell
2023-01-16 17:55 ` Mike Christie
2023-01-16 18:07   ` Martin K. Petersen
2022-08-24  1:50 Stephen Rothwell
2022-08-29  4:54 ` Stephen Rothwell
2022-08-30  2:11 ` Martin K. Petersen
2021-08-17  9:47 Stephen Rothwell
2021-08-17  9:51 ` John Garry
2021-08-18  3:07   ` Bart Van Assche
2021-08-18 11:41     ` John Garry
2021-05-27  3:47 Stephen Rothwell
2021-03-12  3:17 Stephen Rothwell
2021-03-12  3:20 ` Jens Axboe
2021-01-25  4:13 Stephen Rothwell
2021-01-25  5:53 ` Douglas Gilbert
2021-01-27  7:01   ` Stephen Rothwell
2021-01-27 17:10     ` Douglas Gilbert
2020-12-08  9:28 Stephen Rothwell
2020-12-08  9:30 ` Christoph Hellwig
2020-12-08 10:01   ` Stephen Rothwell
2020-12-08  9:38 ` Stephen Rothwell
2020-12-08 17:55   ` Alan Stern
2020-12-08 19:56     ` Bart Van Assche
2020-07-21  6:30 Stephen Rothwell
2020-07-23  5:54 ` Stephen Rothwell
2020-07-23 15:01   ` Martin K. Petersen
2020-07-24  4:21     ` Kiwoong Kim
2020-01-22  4:10 Stephen Rothwell
2020-01-22  9:51 ` John Garry
2020-01-23  2:22   ` Martin K. Petersen
2019-10-25  3:07 Stephen Rothwell
2019-10-25 18:03 ` James Smart
2019-10-28  5:49 ` Stephen Rothwell
2019-10-29  2:28   ` Martin K. Petersen
2019-10-29  2:48     ` Stephen Rothwell
2019-04-09  6:27 Stephen Rothwell
2019-04-10  1:21 ` Stephen Rothwell
2019-04-10  1:33   ` Martin K. Petersen
2019-04-10  4:04     ` James Bottomley
2019-04-10  4:57       ` Stephen Rothwell
2018-03-22  6:25 Stephen Rothwell
2018-03-22 16:33 ` Madhani, Himanshu
2017-12-07  3:57 Stephen Rothwell
2017-12-07  3:59 ` Bart Van Assche
2017-12-07  4:25   ` Stephen Rothwell
2017-12-07  4:42     ` Paul E. McKenney
2017-12-07 17:30       ` Bart Van Assche
2017-12-07 17:40         ` Paul E. McKenney
2017-12-07 20:34           ` Stephen Rothwell
2017-12-07 21:10             ` Paul E. McKenney
2017-12-07 21:11             ` Martin K. Petersen
2017-12-07 21:11               ` Martin K. Petersen
2017-12-08  1:00               ` Martin K. Petersen
2017-12-08  1:00                 ` Martin K. Petersen
2017-12-11 17:43                 ` Paul E. McKenney
2017-05-17  2:57 Stephen Rothwell
2017-02-23  3:12 Stephen Rothwell
2017-02-23 14:19 ` Martin K. Petersen
2017-02-23 15:04   ` Chad Dupuis
2017-02-22  2:41 Stephen Rothwell
2017-02-22 21:06 ` Stephen Rothwell
2017-02-22 21:10   ` Martin K. Petersen
2017-02-22 21:13     ` James Bottomley
2017-02-22 21:17       ` Martin K. Petersen
2017-02-27  1:54   ` Stephen Rothwell
2017-02-27 15:25     ` James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220427182853.2587e788@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sumit.saxena@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.