lkml.org 
[lkml]   [2023]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] io_uring: Pass whole sqe to commands
On Thu, Apr 20, 2023 at 06:57:12AM +0200, Christoph Hellwig wrote:
> On Wed, Apr 19, 2023 at 03:29:29AM -0700, Breno Leitao wrote:
> > struct nvme_uring_cmd_pdu *pdu = nvme_uring_cmd_pdu(ioucmd);
> > - const struct nvme_uring_cmd *cmd = ioucmd->cmd;
> > + const struct nvme_uring_cmd *cmd = (struct nvme_uring_cmd *)ioucmd->sqe->cmd;
>
> Please don't add the pointless cast. And in general avoid the overly
> long lines.

If I don't add this cast, the compiler complains with the follow error:

drivers/nvme/host/ioctl.c: In function ‘nvme_uring_cmd_io’:
drivers/nvme/host/ioctl.c:555:37: error: initialization of ‘const struct nvme_uring_cmd *’ from incompatible pointer type ‘const __u8 *’ {aka ‘const unsigned char *’} [-Werror=incompatible-pointer-types]
const struct nvme_uring_cmd *cmd = ioucmd->sqe->cmd;

\
 
 \ /
  Last update: 2023-04-21 17:13    [W:0.457 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site