Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4400630yba; Mon, 29 Apr 2019 20:03:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGTDb11IwZf8kMusJITYduc+AEKpe2xhUE9R9Ixj5rehTefg7yUwxQqPf96Und7UcrJbEu X-Received: by 2002:a17:902:758a:: with SMTP id j10mr2239736pll.221.1556593430254; Mon, 29 Apr 2019 20:03:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556593430; cv=none; d=google.com; s=arc-20160816; b=CBNfa2Dqd4lyTafSxcIMo0pLqr9BAFpnyHfF4f8iQzURRUxLjjN8M2nqZLkS92pxZR 3IDvxPur6g+ZdHQRwt0yNUyO+v3JZFA0MVEnf4bH8ofULySB9xReL4N/bq8amp09ysP5 3EdMEMDyLjl9Yu9gPnvOeBd2lGYIOOR96TbjWjsWblsqKGbKpiQE5CcgW/aHjGG9EPO4 75jttLmCiM5eiAq3Iiv9wkMPqh2YesMD+sXHhGm3jHVZAuKgZZED1l+oL3qc1+fq8TE3 +lfPcW7xROY+nhlCXsrk2j1EHEkAf7jsDW4mUYgXXUvDAgcxf2viqFdLuaB3rPyOh/JF mQTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=reg/8g2qJZZL5Xnb4wFASQkQZMos2NBpGmgBMizX5KY=; b=fKhlszy5qxzdDLiw1hUgRmMafyEMLdjUlD6q7r5WTBYsRwgMOLLGA2Sk6mMVJEeop3 lBGWxVRSv4kJ15/9CNGPTRm8KC5N9oU/Qeta9vjGN2gZy/wkjMOH5nkYwt8+cY7S4qzv WdJ/XpX07dRb39lsXF3ipcpyeEgjMh3Z4W5y7xBJ8LBxt9trklnyPRFfAv53TJCh3YPK ij7xdLGwsNpixfKaWnWNaPM831RjiLDlOKqCdDzc1uVCqamSdLl5xXe7X3VrYsMS7ZiK OZ+Fdl+i9EG4c4IlGuGS0ymOJJ2c2rFYTFs2zVk5hZ70JbaxpqSngMmVNO0Np8kZ56WU OGJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b10si12489164plk.13.2019.04.29.20.03.34; Mon, 29 Apr 2019 20:03:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729964AbfD3DCg (ORCPT + 99 others); Mon, 29 Apr 2019 23:02:36 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:37322 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729803AbfD3DCg (ORCPT ); Mon, 29 Apr 2019 23:02:36 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1hLJ2F-0005lp-S8; Tue, 30 Apr 2019 03:02:23 +0000 Date: Tue, 30 Apr 2019 04:02:23 +0100 From: Al Viro To: Nicholas Mc Guire Cc: Sven Van Asbroeck , Nicholas Mc Guire , Greg Kroah-Hartman , devel@driverdev.osuosl.org, Linux Kernel Mailing List Subject: Re: [PATCH V2] staging: fieldbus: anybus-s: force endiannes annotation Message-ID: <20190430030223.GE23075@ZenIV.linux.org.uk> References: <1556517940-13725-1-git-send-email-hofrat@osadl.org> <20190430022238.GA22593@osadl.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190430022238.GA22593@osadl.at> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 30, 2019 at 04:22:38AM +0200, Nicholas Mc Guire wrote: > On Mon, Apr 29, 2019 at 10:03:36AM -0400, Sven Van Asbroeck wrote: > > On Mon, Apr 29, 2019 at 2:11 AM Nicholas Mc Guire wrote: > > > > > > V2: As requested by Sven Van Asbroeck make the > > > impact of the patch clear in the commit message. > > > > Thank you, but did you miss my comment about creating a local variable > > instead? See: > > https://lkml.org/lkml/2019/4/28/97 > > Did not miss it - I just don't think that makes it any more > understandable - the __force __be16 makes it clear I believe > that this is correct, sparse does not like this though - so tell > sparse. ... to STFU, 'cause you know better. The trouble is, how do we (or yourself a year or two later) know *why* it is correct? Worse, how do we (or yourself, etc.) know if a change about to be done to the code won't invalidate the proof of yours? > The local variable would need to be explained as it is > functionally not necessary - therefor I find it more confusing > that using __force here. What's confusing is mixing host- and fixed-endian values in the same variable at different times. Treat those as unrelated types that happen to have the same sizeof. Quite a few of __force instances in the tree should be taken out and shot. Don't add to their number.