Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2178628rwb; Wed, 30 Nov 2022 03:30:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf5W12kyWXNlCnCa13BIBXsaLYw6gLoGeps8ixtUW0ORPb+1lNJ+x3YIOQBUO1Mpo/YpL7bq X-Received: by 2002:a17:903:2350:b0:189:907c:8378 with SMTP id c16-20020a170903235000b00189907c8378mr12439011plh.107.1669807849871; Wed, 30 Nov 2022 03:30:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669807849; cv=none; d=google.com; s=arc-20160816; b=coToKuWsRi+H0RE/ZtOwGPkWQy/0LiUvIvDBz+5ReB4Bhw1Y4v6NVv7Wj6oVadKHGC ILsh7mEiLgxspmoH/mqKPrDe0dBnttNL0Yv7zyP0Y+bDQwKPSnllQimDayxbryjdopET r7tHn1EMAtUj/L25kNv+PfjbPT7LFoX06njyZA0eHiFZNHvUhQKk+Y9cY61tNBA8AWdm O9yjxP+wfopNmgnMaeiGAJ6KZCd6u1EFN/jJUw3CLfp2yP3qnr3Dg6NcRBWKi+nfaXfq rlFuZrTWvM3NvflowPWLB2KKjNYjqPEtHnCfduEvqdwd2uAhXWxdFQe3YpCQktfitHAx hsLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=1s19IypA/exrMqJ/SrfQpXbC9LSi8zKCSNEgknq5a5Q=; b=I+fAGZcjo+kGwkfpMV1OWx6bRuMlXsafNCY2xtbI0XnnEJFJNTEWuuG9+RkbE1yPtx W5/gmSW1MC6Po1Q4EG4RxDDZOi07yr5jGZ2/5h83SvpWrmmFAKt8vYQcyporMWA0+om2 uH3YiTMutHZyjdBZ6KnCP5kc2DTCCF39H/yTpJ1zrHXWMeIHb3AI16AgIASqV7m7cg8O bbMBe1EEoc/04CwOLC2//aFfEhUmfdUn7R5d6lVTpIDdhTJBfZXp5qeKfeuSUihKMQUn x1L+6aF70eJlIrZvEzB2ZIsIw1grPnUmrG1GvYsmDzyOa5rrXUPHcnHzNMSROPgLAFX4 8XAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Y1d2o2XR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mw5-20020a17090b4d0500b0021903cece58si1474760pjb.48.2022.11.30.03.30.39; Wed, 30 Nov 2022 03:30:49 -0800 (PST) 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=@intel.com header.s=Intel header.b=Y1d2o2XR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229929AbiK3KvN (ORCPT + 84 others); Wed, 30 Nov 2022 05:51:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbiK3KvM (ORCPT ); Wed, 30 Nov 2022 05:51:12 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 257AC716C1; Wed, 30 Nov 2022 02:51:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669805472; x=1701341472; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=yhIEfje7scP4uHE/V4Mj7IrqqEE1cET9PfIRw9AAsgM=; b=Y1d2o2XR9DrFKt2vzA9JQeSxtyMKipFfrI1N8j1/xurYxhVzOoMZjVT0 cesNcQlyXWW4pUlrvqBHuRWOR1+YqWNkiAWZL7x5sjSxuoUk1+VWf2RnA KNi0LPr18LxPMoHO6b/elSJ3E0y0jzJOZqmbYtZaVCFawLNdb3ZLWhCFB TfNLNnjj/peBMWvTVTlvK5S5NsibJnRUMYLJp8T7ZVl8lc2L11t/pR8Hp rmJCKO/NrFkKRouAbfnkzuVXSqs9i7nXJZdrCQWmQfZ/0g/EnIoFpqEKo 2ilGjCRCGWN4dBT9HnTQIXfeJTeVPv9iEUYoiIxz3ENxTx/ttVPPSQ3K2 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10546"; a="302968581" X-IronPort-AV: E=Sophos;i="5.96,206,1665471600"; d="scan'208";a="302968581" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2022 02:51:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10546"; a="818585158" X-IronPort-AV: E=Sophos;i="5.96,206,1665471600"; d="scan'208";a="818585158" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga005.jf.intel.com with ESMTP; 30 Nov 2022 02:51:09 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1p0KgE-002Dib-37; Wed, 30 Nov 2022 12:51:06 +0200 Date: Wed, 30 Nov 2022 12:51:06 +0200 From: Andy Shevchenko To: Mika Westerberg Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Jamet , Yehezkel Bernat , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Subject: Re: [resend, PATCH net-next v1 2/2] net: thunderbolt: Use separate header data type for the Rx Message-ID: References: <20221129161359.75792-1-andriy.shevchenko@linux.intel.com> <20221129161359.75792-2-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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, Nov 30, 2022 at 09:46:16AM +0200, Mika Westerberg wrote: > On Tue, Nov 29, 2022 at 06:13:59PM +0200, Andy Shevchenko wrote: > > The same data type structure is used for bitwise operations and > > regular ones. It makes sparse unhappy, for example: > > > > .../thunderbolt.c:718:23: warning: cast to restricted __le32 > > > > .../thunderbolt.c:953:23: warning: incorrect type in initializer (different base types) > > .../thunderbolt.c:953:23: expected restricted __wsum [usertype] wsum > > .../thunderbolt.c:953:23: got restricted __be32 [usertype] > > > > Split the header to bitwise one and specific for Rx to make sparse > > happy. Assure the layout by involving static_assert() against size > > and offsets of the member of the structures. > I would much rather keep the humans reading this happy than add 20+ > lines just to silence a tool. Unless this of course is some kind of a > real bug. Actually, changing types to bitwise ones reduces the sparse noise (I will double check this) without reducing readability. Would it be accepted? -- With Best Regards, Andy Shevchenko