Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1927292ybm; Thu, 23 May 2019 08:44:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwLzVQiPXruOYlp0XqX9cRhU5nZEvDf4zGsbUJYr+AUZBTH4ixvDI6Si78GuFCZ+GUIQsgP X-Received: by 2002:a17:902:2808:: with SMTP id e8mr73015621plb.244.1558626259767; Thu, 23 May 2019 08:44:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558626259; cv=none; d=google.com; s=arc-20160816; b=hFa0Xf6FZ7YoOdVBY/oZOHXgViwMKgaAxZXv7dz5hhcwwIGe78biXb/SzR0bdiU31/ 4Fv+zrlucEK3N3Kfa/N5jQ4NfBJq86J5cPcw0fUFI04mNnI1uigDDSTjPKbAjbx+L1Yx qmqJToSkam9CdlUX1/KUJhto+OgqXwLgnVini1llwTPJkdFJ1aCN17ZSwW/pgp4sICj5 c6wEjvgU+jaiGRKwBmkHaTyAvDvvfd6DRFJvr6B1lU7fG/X/U8W2DN4qWADixGLzODb0 zSFDGotc2XYOcW+1cHihwlljIdVC2JYjwqVkgp0NMczZgBuqmoJZD2KHTDco9bhfasYu dWvA== 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=VeIrenckhuVzsCbHDjvm6KMt/OvobDqmh7z2jv+o+xM=; b=zNVHQpvXz6Q7r2hyi2N8fbe6I6s38zW0boKO/TFbUylJJj2deozH+lHB3qbJXjrioO 0um6C4/9gFufbSrSdKv2tSOHPRK0SphXsslydWkob94ioCVnZIIDI5mt4Q12FRPWjW1K HTVx/fJDO5CoCLcYtwwGXWdgn1RgDzqGh7KH15/gZL3stJ1LgiY5f2SWsKX5mqmFZrSW KaM8cMfeFOeq1o4hFhciOk8CQScxMR+Ti5WR0urQVUBO/SdqRxwiU8vF9/TLGZ85FXZL J8s7Z3w+6amd+8uvB/NamKMKbP0/CMVfYfGRiybp7cZrJMX3saCbv30CUv6lJWcgZrwi 3Lkw== 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 r185si29806816pgr.10.2019.05.23.08.44.02; Thu, 23 May 2019 08:44:19 -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 S1731117AbfEWPmr (ORCPT + 99 others); Thu, 23 May 2019 11:42:47 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:55309 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730913AbfEWPmr (ORCPT ); Thu, 23 May 2019 11:42:47 -0400 X-Originating-IP: 90.66.53.80 Received: from localhost (lfbn-1-3034-80.w90-66.abo.wanadoo.fr [90.66.53.80]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 6ECBFC0008; Thu, 23 May 2019 15:42:44 +0000 (UTC) Date: Thu, 23 May 2019 17:42:44 +0200 From: Alexandre Belloni To: Nicholas Mc Guire Cc: Alessandro Zummo , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rtc: ds2404: use hw endiannes variable Message-ID: <20190523154244.GU3274@piout.net> References: <1557368035-6787-1-git-send-email-hofrat@osadl.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1557368035-6787-1-git-send-email-hofrat@osadl.org> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/05/2019 04:13:55+0200, Nicholas Mc Guire wrote: > Converting from hardware to host endiannes was done using reassignment > to the same variable which makes sparse unhappy as it can not verify > the endiannes handling properly. To allow sparse to verify endiannes > handling an explicit __le32 is introduced. Note that this patch does > not change the generated binary (x86_64 and ppc64 binary diff). > > Signed-off-by: Nicholas Mc Guire > --- > > Problem located by an experimental coccinelle script to locate > patters that make sparse unhappy (false positives): > > on little-endian x86_64 sparse complains about: > drivers/rtc/rtc-ds2404.c:187:16: warning: cast to restricted __le32 > on big-endian ppc64 sparse complains about > drivers/rtc/rtc-ds2404.c:187:16: warning: cast to restricted __le32 > drivers/rtc/rtc-ds2404.c:187:16: warning: cast to restricted __le32 > drivers/rtc/rtc-ds2404.c:187:16: warning: cast to restricted __le32 > drivers/rtc/rtc-ds2404.c:187:16: warning: cast to restricted __le32 > drivers/rtc/rtc-ds2404.c:187:16: warning: cast to restricted __le32 > drivers/rtc/rtc-ds2404.c:187:16: warning: cast to restricted __le32 > > Patch was compiletested with: > x86_64_defconfig + RTC_DRV_DS2404=m > ppc64_defconfig + RTC_DRV_DS2404=m > > in both cases applying the patch has no impact on the generated binary. > > Patch is against 5.1 (localversion-next is next-20190508) > > drivers/rtc/rtc-ds2404.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > Applied, thanks. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com