Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2399084rwr; Fri, 21 Apr 2023 08:22:01 -0700 (PDT) X-Google-Smtp-Source: AKy350YskasTTKXdxPeHgk5ke5rvxb6JaOQDxFO/B9bghOwwM3z7PZ1Cg7Milt7p34HmRFAhzQyS X-Received: by 2002:a17:90a:48:b0:249:64da:2f41 with SMTP id 8-20020a17090a004800b0024964da2f41mr4472910pjb.4.1682090520942; Fri, 21 Apr 2023 08:22:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682090520; cv=none; d=google.com; s=arc-20160816; b=tcM5rb2hX8u2mirgPJTdVgCPGITI8Ylh/Dvwe0xf7AAnaUH8KxhBslXF3ePbFGn5x+ jwNVetAm6pUnIr8glJRycedBCPrCsJ8NboQP5ebBsvLgDwdTjVHLYMs0fZsuLmW1m0ai KxFQmguwY8xhE/0rov/Tj/+bh6lz4yb+NlJra03uTngqWjRTwtAn2xQ9LBuE+0QKa6bf qFLpfQ4Nkp2aHXnN54mKmia/p9NaKjEeiiXboVDidMClmj71C6Pf1KiuUgVa8m9lUOL/ UMN/q9WWwywJcI3D4FrC85uOI9wnoGiR98d9CcdDkedAEWsrrBw8IB4mFR9ylmKc3hV1 W0eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=o/1bU+3yxMOBZJYn8hiebgLUc19mnJbyR5cgTJ3rOoE=; b=mRvtchb0TNYttxUB23W/5pk86QMmDgHfcnHh1OZZSTlTR8bLMBLh3l3Y0NS+G2j4hx /tkKoKvCxVT/lpjdOMKc1oDjf79EZLvPcie8RtWKvI1Tsi83Yxh58ujKqbj88DBpSsmY neAHY6xCPUUQQyhB2nPZDG5p/Hz3Xzrb8PUObwdoeTbba8UEs77ocUdgAd7HBhqVc0PK oAMSf/97frOqL3S+qNpQ2RwMQmRXZQJt8zFVftRB8b6CIkBw5hLIdpX4LG7I+9A3EefS QqgaxJjge31KS0Bjoq2bufHYUYZ9tthHmaDPFRNw8RUrkij5oTLn6WBA46e7aukbYkks fiGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u10-20020a170902714a00b001a52967ac48si4362393plm.149.2023.04.21.08.21.46; Fri, 21 Apr 2023 08:22:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232321AbjDUPLp (ORCPT + 99 others); Fri, 21 Apr 2023 11:11:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230472AbjDUPLo (ORCPT ); Fri, 21 Apr 2023 11:11:44 -0400 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3CD9125A9; Fri, 21 Apr 2023 08:11:35 -0700 (PDT) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-3f178da219bso18928115e9.1; Fri, 21 Apr 2023 08:11:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682089894; x=1684681894; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=o/1bU+3yxMOBZJYn8hiebgLUc19mnJbyR5cgTJ3rOoE=; b=JqQ0U0B62sc1MttFb74RoR1NEOA/uQT/JGtPmDFOhqZaA4BiEmvBpUn0uWZhxC60q+ HGbSL5T33VFVfuoQlKhbEER6d0cadcxi7ZZ6sT79sl8a8BwPBLevsFk5dmwPwbvJIJJ7 R3Y5vGXbBzsA/EmgvP2YUF6M8x+navM/pu0XvCBWywU8ww1CSzQ7SOxGAgC+ySvvqkTR 2F+XcmSqAh8FxGV7d4Bw667xL0gLjw0u4lL/PAe7R+bMVV/9M/uMQ2ewiHp3MDLtG9ag FgIZ14+aG14ctdlsrHYmMtda5U5+Dwr/acJW3QRMw5i6d8Tw5bov/BLzhU5gHzSk2/EC duwA== X-Gm-Message-State: AAQBX9dMcTZazM21+BMI2+FTi4xTWUaWrbG80layV2s8lcFjz6SGpuJV nIR61M3qiKAEl87qH7xUChw= X-Received: by 2002:a1c:c906:0:b0:3f1:6ec5:3105 with SMTP id f6-20020a1cc906000000b003f16ec53105mr2233609wmb.20.1682089893877; Fri, 21 Apr 2023 08:11:33 -0700 (PDT) Received: from gmail.com (fwdproxy-cln-011.fbsv.net. [2a03:2880:31ff:b::face:b00c]) by smtp.gmail.com with ESMTPSA id c21-20020a7bc855000000b003f17300c7dcsm4990006wml.48.2023.04.21.08.11.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 08:11:33 -0700 (PDT) Date: Fri, 21 Apr 2023 08:11:31 -0700 From: Breno Leitao To: Christoph Hellwig Cc: io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, asml.silence@gmail.com, axboe@kernel.dk, leit@fb.com, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, sagi@grimberg.me, kbusch@kernel.org, ming.lei@redhat.com Subject: Re: [PATCH 1/2] io_uring: Pass whole sqe to commands Message-ID: References: <20230419102930.2979231-1-leitao@debian.org> <20230419102930.2979231-2-leitao@debian.org> <20230420045712.GA4239@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230420045712.GA4239@lst.de> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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;