Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4879244ybv; Tue, 11 Feb 2020 05:13:21 -0800 (PST) X-Google-Smtp-Source: APXvYqwy/qAiY9sYwS54DCPUm0RI9Fbo3mnESoIQB4Ce8brwfnz0yyoy4PPy7gp1Ztw8uq7oOvB1 X-Received: by 2002:a9d:21c5:: with SMTP id s63mr4933875otb.142.1581426801574; Tue, 11 Feb 2020 05:13:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581426801; cv=none; d=google.com; s=arc-20160816; b=HTmZMmW3Y1j0PRv7c11nJ9xrVnfD3Jqa6Kl5x1pubyGo6n2j3FBqOZM6LEHFLtRqvC GKZw7RzrBol0YYbHnK7Vjiij1QPK6ZEzJVrUHwT3eTkJPKRfGHx0HIe4TF+tylaJpfU6 +yrx06ZbQ5XlW8JqGQFBiJ9gcNx3pHxZui8g69KeJrzKcRqEbzUdjhHCKKuu30E4XuZd Gzwc+QPQkM5gyCAK8AjFK8dXrs8UDMpmIuFyToBT4jUH3VRHn82W+4R2DAoYn7Q+0T0d mEnt/rTSMRf4pJwwlegV+t9SVXMDRqHc7ibzUULPq7s1jUdD6ADoi5nd2SAeOGw84Wsx Qdyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=GDvzCLGt5c5qHc0vci/DjjZE2eXnPjTvCzn9dwJwwQ0=; b=vnbJ1FqWblUSZ6L40uLk83iOFWMwJjDRtwSqKMarw/UN0yG64jyozDn6BMcWHxMv45 Y5LAOQEFr/tnDQyGL8w+li/Z5+J7kE0tXLNTYe89xO+2pE684eNPlx6TS6saiIUukmg2 rQpcTau8TK9Mi7vQwkqOpaJL9Rbb+8/ck/wOrdDKZilW32Dn1cks/zRliZ/sydMkhJ36 aHuzq6l0spvR3bUznGBBASnkH9spKbn3lt8+ZF62I1KwpaVnrKz5Aof1eGpb/tzd2rwS z4m6y3mgjJyPI7lG1rMeOPz6GLEoBeXreOiZ3CFOZWQ1hxEMZPruQ5miFxzg5Z7Zkros TMzw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c67si1639051oib.276.2020.02.11.05.13.03; Tue, 11 Feb 2020 05:13:21 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728991AbgBKNMe (ORCPT + 99 others); Tue, 11 Feb 2020 08:12:34 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:9484 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728697AbgBKNMd (ORCPT ); Tue, 11 Feb 2020 08:12:33 -0500 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01BD2VWE100388 for ; Tue, 11 Feb 2020 08:12:32 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y1tn3u2xh-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 11 Feb 2020 08:12:24 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 11 Feb 2020 13:12:14 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 11 Feb 2020 13:12:11 -0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 01BDCAtN21233696 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 11 Feb 2020 13:12:10 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3222FA4060; Tue, 11 Feb 2020 13:12:10 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C25C9A405F; Tue, 11 Feb 2020 13:12:09 +0000 (GMT) Received: from localhost (unknown [9.145.77.145]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 11 Feb 2020 13:12:09 +0000 (GMT) Date: Tue, 11 Feb 2020 14:12:08 +0100 From: Vasily Gorbik To: Nathan Chancellor Cc: Heiko Carstens , Christian Borntraeger , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] s390/time: Fix clk type in get_tod_clock References: <20200208140858.47970-1-natechancellor@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200208140858.47970-1-natechancellor@gmail.com> X-TM-AS-GCONF: 00 x-cbid: 20021113-0008-0000-0000-00000351E012 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20021113-0009-0000-0000-00004A72814C Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-11_03:2020-02-10,2020-02-11 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 malwarescore=0 mlxscore=0 impostorscore=0 phishscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002110100 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 08, 2020 at 07:08:59AM -0700, Nathan Chancellor wrote: > Clang warns: > > In file included from ../arch/s390/boot/startup.c:3: > In file included from ../include/linux/elf.h:5: > In file included from ../arch/s390/include/asm/elf.h:132: > In file included from ../include/linux/compat.h:10: > In file included from ../include/linux/time.h:74: > In file included from ../include/linux/time32.h:13: > In file included from ../include/linux/timex.h:65: > ../arch/s390/include/asm/timex.h:160:20: warning: passing 'unsigned char > [16]' to parameter of type 'char *' converts between pointers to integer > types with different sign [-Wpointer-sign] > get_tod_clock_ext(clk); > ^~~ > ../arch/s390/include/asm/timex.h:149:44: note: passing argument to > parameter 'clk' here > static inline void get_tod_clock_ext(char *clk) > ^ > > Change clk's type to just be char so that it matches what happens in > get_tod_clock_ext. > > Fixes: 57b28f66316d ("[S390] s390_hypfs: Add new attributes") > Link: https://github.com/ClangBuiltLinux/linux/issues/861 > Signed-off-by: Nathan Chancellor > --- > > Alternatively, changing the clk type in get_tod_clock_ext to unsigned > which is what it was in the early 2000s. > > arch/s390/include/asm/timex.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h > index 670f14a228e5..6bf3a45ccfec 100644 > --- a/arch/s390/include/asm/timex.h > +++ b/arch/s390/include/asm/timex.h > @@ -155,7 +155,7 @@ static inline void get_tod_clock_ext(char *clk) > > static inline unsigned long long get_tod_clock(void) > { > - unsigned char clk[STORE_CLOCK_EXT_SIZE]; > + char clk[STORE_CLOCK_EXT_SIZE]; > > get_tod_clock_ext(clk); > return *((unsigned long long *)&clk[1]); > -- > 2.25.0 > Applied, thanks. I wonder though if Fixes: tag is really required for such changes. It triggers stable backports (for all stable branches since v2.6.35) and hence a lot of noise.