Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1640244iob; Thu, 19 May 2022 10:52:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpuODQ6p5ikXzbi1rB0KLShVUkZDtQpvgPvcW6tUscOkxjV5HUX1FZKSNOXje2+bYpn+zP X-Received: by 2002:a17:906:99c3:b0:6f4:a9d7:6dac with SMTP id s3-20020a17090699c300b006f4a9d76dacmr5336829ejn.85.1652982755465; Thu, 19 May 2022 10:52:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652982755; cv=none; d=google.com; s=arc-20160816; b=bV6e5I62LnO2tKnJSoIftYIDK+8tK/Z5gT+7FSxjSPvELE5dMTwFBAHPvNeFVRxLJ5 OPFmvuEGpbny07TmyLyde1maSd4lGNW8bv00BHTD0ClCEoOKaOeQtvfT5gh9a18Bs+oM Gup3v/mQ4WHfOfZDEiBHbWLRfpXvq+ea9sJ//vOUgASvivQTsiUXkOnXc+kQ2qRkyJD/ zvD0quUmSbwt+7Pu9HfCMjxV/tKrnQa47KLZkNywVFMtJXkVJ5Y14NlhS/cdr8N3VAl0 ky87nVnvAninvPWM/3wp/2dlHbHESdcw7pvjokp3sEkP3c9dQm8npdoTZ0B8ySK5HoUl dRng== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7u2c7SfZw4F2WE/l0TOBqN1etCbMDPzaGXFTwtFLUR4=; b=OqBsC4xMedAb8VjryMjMjuRhs2Mi3m5TuCsgKyUhAEHziwuk569N68tuNeh3538LKw h62zUvSWxSCYxnEz4dy9DnC4doj+tlW2LrvOHAjEuuBzwXxd3TF7sc+7db2O6FvEPsiH eQTe4N2osPI9rCKTleyqDvJgrHPnEfwZvoap7J7PBECKHqnTRakMwf378k+TT58SnKrV EzypyOHtBj0Q1XGY5P6Vrv9Y++70lQOzwnQXsGLqLt/vvt0tf5FSz4QnzQ8VNycD+Q0c UqjKsPiJKMlgzCHCAKbfbC7Hfg0QVRcaTEJbyH6uNGHUnZb+PWEDoetTp0YiEYf13aU5 R1Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=AozOtmYY; 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 gl1-20020a1709073c8100b006fe8c8dc0f2si4819201ejc.714.2022.05.19.10.52.09; Thu, 19 May 2022 10:52:35 -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; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=AozOtmYY; 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 S233439AbiESHDM (ORCPT + 99 others); Thu, 19 May 2022 03:03:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230056AbiESHDK (ORCPT ); Thu, 19 May 2022 03:03:10 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84540275; Thu, 19 May 2022 00:03:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=7u2c7SfZw4F2WE/l0TOBqN1etCbMDPzaGXFTwtFLUR4=; b=AozOtmYYEJqF6EhHgojTQIbAQ+ p4IjDmwTWU9+pgZ6DB8MVOw/rbIOQCCOaHvHL2taHp0oJjgTNG8OEo9S0iC+9jT90vFelThaNKpca S1jtSV3FfNZCatApiHLF4UwsoZz/Upju/uMnezte0iIWzC/RUQVJhDKeTKeI1dpA1VerZpDJIZGrj QGkzfk6zSr3L9nLOtiOXHtGziqiVAjw286fOk70iEwYEDlZTW2EUAiKF59gGCshI21dMM9zODBa3e 7Wfb6EnmcPgFm4V0xQuEnFiouW4IvqU4VCVlTJi6ifnm3HHOdiluCVCeypiP6WdNFTzU8lDrNP2IZ fRyVRfow==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nraBf-005Pls-LU; Thu, 19 May 2022 07:03:07 +0000 Date: Thu, 19 May 2022 00:03:07 -0700 From: Christoph Hellwig To: Vasily Averin Cc: Jens Axboe , Christoph Hellwig , kernel@openvz.org, linux-kernel@vger.kernel.org, Pavel Begunkov , Steven Rostedt , Ingo Molnar , io-uring@vger.kernel.org Subject: Re: [PATCH v2] io_uring: fix sparce warnings about __kernel_rwf_t casts Message-ID: References: <7de7721b-d090-6400-9a74-30ecb696761b@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7de7721b-d090-6400-9a74-30ecb696761b@openvz.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Wed, May 18, 2022 at 12:20:46PM +0300, Vasily Averin wrote: > __kernel_rwf_t type is bitwise and requires __force attribute for casts. > > To fix the warnings, the patch changes the type of fields in the > corresponding structures: poll32_events and rw_flags are neighbours > in the same union. Jens actually picked up a series from me that picked up most of this, except for this hunk: > index cddf5b6fbeb4..34839f30caee 100644 > --- a/include/trace/events/io_uring.h > +++ b/include/trace/events/io_uring.h > @@ -520,7 +520,7 @@ TRACE_EVENT(io_uring_req_failed, > __entry->off = sqe->off; > __entry->addr = sqe->addr; > __entry->len = sqe->len; > - __entry->op_flags = sqe->rw_flags; > + __entry->op_flags = sqe->poll32_events; > __entry->buf_index = sqe->buf_index; > __entry->personality = sqe->personality; > __entry->file_index = sqe->file_index; For which I did not see a warning even if it looks real to me. But this union with basically a lot of __u32s here looks pretty strange to start with to me.