Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp745718pxx; Mon, 26 Oct 2020 21:59:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjGLgoZTE7g3ynDx0/Lv7oTtQOebJmrFtSjAsK6ZzpIXTytGtlgU46cEpBOn5BaP15u5sK X-Received: by 2002:a17:906:2f10:: with SMTP id v16mr623706eji.320.1603774755502; Mon, 26 Oct 2020 21:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603774755; cv=none; d=google.com; s=arc-20160816; b=0MZ8elMmWDAZawqEbjK9Jo2jNfv5MzvVKOaN57mpzXmok0z30H2Mg7P14PEu5KrfbB gtKGvCGEnKZOklMmY/GUj9Jz+SfW3zADbUJqmokzJCz/gFAUjVrlg5dnmSm6pWnOXbAX h9/D4nnik1Gsdk0Klo6tQyE62S5ifnvsIX+HjQyeSyOWGlNlHswfBEk/bUhRvBTc0yhH MUWCkMQiSsxNInse0mVcMOQHZu2w2eeC/CHLEJMXCLnPdXpAnRIhyqqDAe2pGEPKtfCC DCmnz+krrXzth+dPTABmFs+iMmygDGH2n1cMZKyi2SqX1IYSbF5Pbsx9YsZtTWv469k5 VRBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=jyutk1912iEvWpVS9B9y4J/w0Pjmwp0qicFr2gV4QVg=; b=KpRl+MPZZNnG+f/pojysfJl74OO2kIUJDoaUQPIlJ4de07bnnDaph4ph7RJKSQ2kFY dWiaTxPSV/JhmqYC9qK5NXtFedalpUQDA9bcOErmK63RDASiExvC+vjaeAUyAXcm4/2d nJCapXpGbXMKGyxHQ218xS8xgm+r0jZY538Zut+vNgK46XWmBjr5ht0g5VNEfMq20ov8 CXkdcxnwtp8SoRFyIOqiP00yUwrAhasAubW2s1lr/6LSB/cJ1D399q21LWyN4fzcPvu3 +e4oDEkACKKr/qouh/bbxk4y/wuRZ3qI1EY3d87V8QKreV6EDMdkSTT/7U1C9xZ4qifS eCHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="PuwWMFp/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z3si269624ejw.468.2020.10.26.21.58.54; Mon, 26 Oct 2020 21:59:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="PuwWMFp/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1792660AbgJZTOA (ORCPT + 99 others); Mon, 26 Oct 2020 15:14:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:50924 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1737755AbgJZTH5 (ORCPT ); Mon, 26 Oct 2020 15:07:57 -0400 Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DF50D21D41 for ; Mon, 26 Oct 2020 19:07:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603739277; bh=vYbDisG7UZadajXMw/nlAuSTCeEhQwUZQJvu+Behapk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=PuwWMFp/Hsj/gr+Y8SP1Q3U7qxUYAKqGg6LvnPMe5gme1MoqHSQ4ThL3MQXwF1mUm SLCKZdlQv6CpDQ9jrxyyHIKeVA6lKIwC8E7SwF71KPruU5t7riQ8SjQarBkp+soLrG yOH8M5OK+z8ban5yRlNr+AjZhMXl19h8XVUpVupo= Received: by mail-qk1-f181.google.com with SMTP id h140so9441869qke.7 for ; Mon, 26 Oct 2020 12:07:56 -0700 (PDT) X-Gm-Message-State: AOAM532hBwJ79owt0u48NN/w7RVCnMHxWnlQD+795DlmKnSQQ1OynN4f GvXbkHFMveIPG+1OOc+KYGQc5ogJAvPC/qHjQHw= X-Received: by 2002:a05:620a:b13:: with SMTP id t19mr16125103qkg.3.1603739276000; Mon, 26 Oct 2020 12:07:56 -0700 (PDT) MIME-Version: 1.0 References: <20201026161108.3707783-1-arnd@kernel.org> <20201026132300.6b175028@gandalf.local.home> In-Reply-To: <20201026132300.6b175028@gandalf.local.home> From: Arnd Bergmann Date: Mon, 26 Oct 2020 20:07:39 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] seq_buf: avoid type mismatch for seq_buf_init To: Steven Rostedt Cc: Ingo Molnar , Jiri Kosina , Petr Mladek , Piotr Maziarz , Cezary Rojewski , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 26, 2020 at 6:23 PM Steven Rostedt wrote: > > On Mon, 26 Oct 2020 17:10:58 +0100 > Arnd Bergmann wrote: > > > From: Arnd Bergmann > > > > Building with W=2 prints a number of warnings for one function that > > has a pointer type mismatch: > > > > linux/seq_buf.h: In function 'seq_buf_init': > > linux/seq_buf.h:35:12: warning: pointer targets in assignment from 'unsigned char *' to 'char *' differ in signedness [-Wpointer-sign] > > I've always hated the warning about char * and unsigned char *, as they are > mostly meaningless. Yes, bugs happen with int to unsigned int conversions, > but this is dealing with strings, where unsigned char * and char * are > basically equivalent, except when it comes to one thing, which is why I > prefer unsigned char * over char *, and that is printing out the numerical > values of a buffer, if they go above 177, the char * prints the negative > value, but unsigned char * keeps printing what you would expect. I agree it's a super annoying warning, which is exactly why I sent the fixes to shut it up in common headers. At least that way, building a specific driver with W=2 will only show the warnings in that driver, rather than those in header files as well. > As this is just an annoyance (extra warnings), and not really a "fix", I'll > queue it up for the next merge window. Yes, that was the idea, thanks! Arnd