Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp488979pxx; Mon, 26 Oct 2020 13:11:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxE/rTMQT4Nnslcma1qSainKXt6EMReDDlqCF/mGKM1BzMJ/KQz+uIXj4jdqvWM/eUrm7c+ X-Received: by 2002:a05:6402:74f:: with SMTP id p15mr17873366edy.69.1603743112145; Mon, 26 Oct 2020 13:11:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603743112; cv=none; d=google.com; s=arc-20160816; b=m8nOZMvm74HwTDLpM1Sq0JGYwZzqd+VReOnqtBeZxAHCPDWWsaP3iM5qFMImlUXPoV tw9fQJToTLUjLllohTnp4iqVQPevCJCnLw/H7t70dwaUdNMEGWClFIqkBlmqCuZojAoV D6f5omzZk2E/48kWcRHfA9r78+Gc6pXXf9SS8E+sIWLA2oJ/GhOdXxNEg0n41RqchO7V H97Z+tMQ3Qzyr04ew9oQSL8elV1KxuNn4GyF9wwAE7kq7AXQU16bMFkVnl0OHbOAAr1U 4pL0/CCeoUlDBjziCnNx5+qLa7sMlT2nTStp14MarMncshAIVa0lvuzASTztXYSdFIZ1 nphg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=aPcShwhMVAiQHhIghZSvOL02tLgzZ3VO42edht+A/8o=; b=z5WQHg+1cQS4BVMeJIW7ic9B/wISE8jECg17N5P11Lzs1igIPJraadu1puFKadmT/F C3VE7N7ok1orGkbyG1F2hfnxWMmPvh+JfAdPdN0tpGgivrHxL80XqhkI1Oul/rdAzmLM BBEXZT1Rwmn+HGao5M7W62ziL0XJ3qJfQlgcQjrClathquIWrfjQbryrIqOVLn92YSUW gYMDoeXf8gU7GQT/OdK2czbQRZr638X6Gw7LMA7eZgi6fUj3D2h5UrcamXKrc2gjIfKY mlOKY8drrE8lmfWkC3ti9qAf0WTYp1UUW+q+4Y5yP31Ua2ljNwFoZEAd9wicSWnWzLUR mPIA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm22si7381698edb.382.2020.10.26.13.11.29; Mon, 26 Oct 2020 13:11:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1787640AbgJZRXE (ORCPT + 99 others); Mon, 26 Oct 2020 13:23:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:33526 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403954AbgJZRXE (ORCPT ); Mon, 26 Oct 2020 13:23:04 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B6FE321D7B; Mon, 26 Oct 2020 17:23:02 +0000 (UTC) Date: Mon, 26 Oct 2020 13:23:00 -0400 From: Steven Rostedt To: Arnd Bergmann Cc: Ingo Molnar , Jiri Kosina , Petr Mladek , Arnd Bergmann , Piotr Maziarz , Cezary Rojewski , linux-kernel@vger.kernel.org Subject: Re: [PATCH] seq_buf: avoid type mismatch for seq_buf_init Message-ID: <20201026132300.6b175028@gandalf.local.home> In-Reply-To: <20201026161108.3707783-1-arnd@kernel.org> References: <20201026161108.3707783-1-arnd@kernel.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. As this is just an annoyance (extra warnings), and not really a "fix", I'll queue it up for the next merge window. -- Steve > > Change the type in the function prototype according to the type in > the structure. > > Fixes: 9a7777935c34 ("tracing: Convert seq_buf fields to be like seq_file fields") > Signed-off-by: Arnd Bergmann > ---