Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1938316ybv; Sat, 8 Feb 2020 09:19:44 -0800 (PST) X-Google-Smtp-Source: APXvYqwtYpxznZI3IXjkoC84uKVfASH5WUb/QhAfYx6i8ysdWFSRA60SU4qEvqx8O/lbX9UNFFyW X-Received: by 2002:a05:6830:50:: with SMTP id d16mr4121984otp.166.1581182384334; Sat, 08 Feb 2020 09:19:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581182384; cv=none; d=google.com; s=arc-20160816; b=yFyfmYKukZkxLY5BTgY0aCd/HWiAKySWzrtELCuw+YJPvScMqeuATgTFQhDLm9UNoM URM4/o3Vx61oG9RPN0so2KtAlWE5rpFzJdlkFzEvjvXMNiibv5SK2FGvMJjQ4UyTdg78 GXrU+wonjrnT9vf8o2fAoOeQ9SCH9yoqMpctOGi9dbbS4ZV6jVVyKmn/WniIC99+68z1 IVoUC0lYO0S5W7uBveOK18TGXdmM/vXF67oKAJPZap4d9fT1jE9l5AhkYO8b0zn3Diub tfnUQPGrMBkhDBcaLOBQcDM+VVtjbRq42oTPjvkg0rKMvr0iojly7anFr1B/8565f+OG vV/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=97bjEOo8NHHV0loxcFn46KhJrhrQDZe2/hrTKBrxCbU=; b=M1ge7k3fsrwDG0BfVU6YBa5I5JXYGh327SfI7/3R2B7oy45/fdhAhnbGwa+gsN0nJm k2XSycwU67XWuiq0JSlBt4b3X+JcfhV1rOH37LL97kr3EOYogW7uTu4MQoLiOtabuHoP LIl/ncDG8pkAKBdK3ulYLGZ5qmuqCUJYSQ452pFOH5hYXIyrr5I8gNiPFIB+c+oSHTOL MwLGK9oiHraTuIGRmGBEpdCvkpVYaIqUHRk64R/uXezS+kNDWvlrkYFY6lZ08Y2+Re1R 4qojtZBnpTPdZoipjUhStXnxUXwveMG3YPe/F4ROGHgK8WYikZSBGvra5Ck3cHAh0rh1 I01Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=MJhcoM0S; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h8si5707241oib.104.2020.02.08.09.19.31; Sat, 08 Feb 2020 09:19:44 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=MJhcoM0S; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727484AbgBHRS0 (ORCPT + 99 others); Sat, 8 Feb 2020 12:18:26 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:38193 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727446AbgBHRS0 (ORCPT ); Sat, 8 Feb 2020 12:18:26 -0500 Received: by mail-pf1-f195.google.com with SMTP id x185so1437491pfc.5 for ; Sat, 08 Feb 2020 09:18:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=97bjEOo8NHHV0loxcFn46KhJrhrQDZe2/hrTKBrxCbU=; b=MJhcoM0SRrl5HRn5pz7vMoJ8DjJawM8tIysmSsxEfyKsiCIxwykEjTvF7Gs4rYGNkH kfapTWItfXC6yG580TiICh/O1EYeiyuhEc7YxdWmrdYRl3iBHpVExVKGBLKtFWssQdLH NaVjavbtX7UWI4/6UZgcALrUU9yoOHm8M2eeH7UYRz9qQ6tBNHxq710Cjh0g9PjaC3Uz GASQS3GzqU5vyZ7/rW1sV/x0T3RfgDMuqP65uaIy3AyOkbYXyRaOZvv1Kvpdq4y9BlzC ETiFi6rNabfbCgL6UhBITTePryLaPxECMVudpQmbE2QJH1d66gv3YFg6ISsOWXHtrIgX 8jiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=97bjEOo8NHHV0loxcFn46KhJrhrQDZe2/hrTKBrxCbU=; b=gByXvpOl1eUR9ghNDKaPIRSPS6bmyYqTVaTj9O3RSJBX7ulHX5uEHguSZPry7a4MiT tfVGzGtc09BjWDKOg/IoENcY/uU4Ag0f/8ML30u0jOkkZwj0gFU71vZiaEd15V96vPP3 fm6bwycfKYWl1pJC129h0SbR1d3U8CDdFGWgo3HhaF8upICAZN1f3R9hvYhqJlhRNlZy fujQv52aAGcUkZk34wmeEJvSuHusORC6Yte5V+utvoEAgm9r00ixx4ccSzldpuiE3Jhn VvI+I8jvYObrmg8427PSheaKF+l/HG/sLq704Ye0z++BU7U5wtFJuJIVEAHK79j46oMR lFUQ== X-Gm-Message-State: APjAAAUQFDU73Sr6loD451a5ki5qxWiX3zHgfbMFoaLwqXU70CT+8hWd KtWOjr0lxD+5GwQrJbVzRRpMLwiOx+fG2/qApbtr3w== X-Received: by 2002:a63:d249:: with SMTP id t9mr5721230pgi.263.1581182305426; Sat, 08 Feb 2020 09:18:25 -0800 (PST) MIME-Version: 1.0 References: <20200208140858.47970-1-natechancellor@gmail.com> In-Reply-To: <20200208140858.47970-1-natechancellor@gmail.com> From: Nick Desaulniers Date: Sat, 8 Feb 2020 17:18:13 +0000 Message-ID: Subject: Re: [PATCH] s390/time: Fix clk type in get_tod_clock To: Nathan Chancellor Cc: Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-s390 , LKML , clang-built-linux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 8, 2020 at 3:10 PM 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 First time I've seen a `typedef` in a function. I wonder if that makes its definition have function scope? (re: get_tod_clock_ext()) > --- > > Alternatively, changing the clk type in get_tod_clock_ext to unsigned > which is what it was in the early 2000s. Yeah, it doesn't really matter for this case, it looks like. Either way, Reviewed-by: Nick Desaulniers > > 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 > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20200208140858.47970-1-natechancellor%40gmail.com. -- Thanks, ~Nick Desaulniers