Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3897719yba; Tue, 23 Apr 2019 11:22:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSLgXcoZB8WS19S8rfoXQmwr4V7N6uZ1IrjMckfr5rOuUkO7iq4AN9DJR2+PAWtrmfoOwz X-Received: by 2002:a17:902:1d4a:: with SMTP id u10mr2164350plu.272.1556043777923; Tue, 23 Apr 2019 11:22:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556043777; cv=none; d=google.com; s=arc-20160816; b=ABqobKYkbD7WXNMnB3JDoEq1i1DIq167M88MrDU8r4ZaBSvEKkvdNtIPwWFx8EM9jR bDz5nzh8sFTr6nAulOF5LOArshfcD3xXIxovmacvpR0+hGAyZGk2tEWGoSZvA7nRzb0i n2vkIAcmJTB9ctlca9rQjEVXSIfxXkWUyOVlRQw8sXzXlyumv5TizuSnX0Z7piSQxlJ0 Z5dp+6efjXrMkMRBaVNPn/41+WKIqnq1S69/cYkxEtPjaZd2UEkLg0MnnNybQg8WCbNI 9ev4Q5feCCO1/zZ9J0R6zw94EZmuQPMqwgTL4+oF2ErN9MoWqCdJCcb3q3555a8RdD0K 0jgA== 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=x5RQU4EyaShn7ES1Et2UEJDFFRacmhuQJUjXc17xW2Q=; b=OqDAjrX5z4KPWAlv4woDKzlxoxPiHjnqanVTzjfl9m3MNWQYZdO3ThFjktQ474S6hF BUdPGNtSMtMR3x7cx2ZD8Hev1lseVrlTn0As3nOfNRlqqhQNSBMBK9fAjMISeQBzmEsL yWOsR+FjOWplnpZqp5cjqhgJWUuen8nxQV1VDA+S/u2gMK2QqmOd6QBeVy+/OE9y0Ool Qdx0b35XMejh418dRK8lPaIki4gO1yDvwXXgHWdibQQq5lYzaorxV/utk/FJ6X2HAstH ZgOEKBbMAR9aJgzt8E9+W2dyVK+bWPKIjzOnr4bkNba+RKAhfDYajtnNIAoIwNxdEGrP sHSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=u3qa2eNF; 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 p187si17367952pfp.89.2019.04.23.11.22.43; Tue, 23 Apr 2019 11:22:57 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=u3qa2eNF; 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 S1726238AbfDWSVl (ORCPT + 99 others); Tue, 23 Apr 2019 14:21:41 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:37814 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbfDWSVk (ORCPT ); Tue, 23 Apr 2019 14:21:40 -0400 Received: by mail-pg1-f195.google.com with SMTP id e6so8016280pgc.4 for ; Tue, 23 Apr 2019 11:21:40 -0700 (PDT) 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=x5RQU4EyaShn7ES1Et2UEJDFFRacmhuQJUjXc17xW2Q=; b=u3qa2eNFA2/UJ2E5nOWKiPqrPzB2E++XYIVXcvXUm03gq52TwZFgH5z2qdj+71s7d+ DTVTtRzrh50UDlWLwFhUu/Aaw+5FMoBWv1Z6yMM94lyWkUta9oeOameAGucLvLa9MqVq lUW/ssGT/bbHbwGUA4lBq51W4eOBneQXXknJsLGbXEQkEcr36clkyyS20Cd9FAUz0kLk Jop8AF1JwOZOGZV3T0wpbMhEyyzxVYfylNhtsrdSYsiDKkto1Lh74N/ESR4xoCUc+Ft+ dMH8gaoBoxKRdXLEUqalEAYvJ1Z2BAHYJf52MfeqWRQsH32qVBU1K2zcl46Jn8ReYDMj dbKg== 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=x5RQU4EyaShn7ES1Et2UEJDFFRacmhuQJUjXc17xW2Q=; b=hTr0BS0nISceUY9SjCQe2W8FCHZgAPl/GNvTk+1Cf6GUNRrpDA8P67F4aA/BZ8p8rx V3ylL3+CZiEQzqiVJ5oDL/UE0DxU/A9Au/wdk12cc1OVA01f66kNDfxsQlGHugV7iAS+ SbGYK+HmpmBJX9SEky81BCc4VpSFyEkhI3pz99dMjsmz0Ut45u7CdaydfKCXOj85QPIc ThHeXE1Ybu41bqNyLCsFM1FCSVz397V5MWh3rU2uPoRPZnB7StYuA3KmcKqAqWtFFtBN aa2LNjFu1sm+mwcEZxiZi801/TFzbTZK5wVXhIsOkAUwx0picGF4cRvqVVhL/h59TEOP 40+Q== X-Gm-Message-State: APjAAAU7AePl3sKnDhTcR1WbdeBAyH7kTWksjtkx7AeOQV5dV1vZ7C3v c7goFOY5kCE7ySQnO0tlK7ipypXZtDkQLuk70GQ40w== X-Received: by 2002:aa7:8096:: with SMTP id v22mr28352978pff.94.1556043699691; Tue, 23 Apr 2019 11:21:39 -0700 (PDT) MIME-Version: 1.0 References: <20190415083605.2560074-1-arnd@arndb.de> <20190415083605.2560074-4-arnd@arndb.de> In-Reply-To: From: Nick Desaulniers Date: Tue, 23 Apr 2019 11:21:28 -0700 Message-ID: Subject: Re: [PATCH v2 4/4] s390: fix clang -Wpointer-sign warnigns in boot code To: Arnd Bergmann Cc: Martin Schwidefsky , Heiko Carstens , clang-built-linux@googlegroups.com, Nathan Chancellor , linux-s390 , Vasily Gorbik , Christian Borntraeger , Janosch Frank , Collin Walling , LKML 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 Tue, Apr 23, 2019 at 1:06 AM Arnd Bergmann wrote: > > On Mon, Apr 22, 2019 at 7:52 PM 'Nick Desaulniers' via Clang Built > Linux wrote: > > > > @@ -20,7 +20,7 @@ extern __u8 _ebc_tolower[256]; /* EBCDIC -> lowercase */ > > > extern __u8 _ebc_toupper[256]; /* EBCDIC -> uppercase */ > > > > > > static inline void > > > -codepage_convert(const __u8 *codepage, volatile __u8 * addr, unsigned long nr) > > > +codepage_convert(const __u8 *codepage, volatile char* addr, unsigned long nr) > > > { > > > if (nr-- <= 0) > > > return; > > > > There are many call sites of ASCEBC which is defined in terms of this > > function. Do they all use `char*`? grep shows an explicit cast to > > `unsigned char*` in drivers/s390/char/tape_std.c for example. > > Generally speaking, the kernel is full of Wpointer-sign warnings, that's why > this warning is disabled in the top-level Makefile by default. My patch fixes > the ones in the s390 boot code that is not built with those default flags, but > I made no attempt to fix the rest of the kernel. Right, sorry, I forgot about that. This patch looks good to me. Reviewed-by: Nick Desaulniers > > Fun fact: on most architectures, 'char' is signed, but on s390 and 32-bit > arm it is unsigned. The compiler treats 'char', 'unsigned char' and > 'signed char' > as three distinct types here for that reason. I think I recall reading about that in: https://www.amazon.com/ARM-System-Developers-Guide-Architecture/dp/1558608745 (I'll try to dig it up and post what the explanation was). -- Thanks, ~Nick Desaulniers