Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp840649rdb; Fri, 23 Feb 2024 01:20:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWtyKf5FNEAwTKzJAX0CZu3Hq+nJfWJ7YdrNqYKS+617dfbgjmmeeabqqz+lbErJ9t9HcSMKRI0NEj+r4shcxBitn8QVQm7H8pfCwH6Ew== X-Google-Smtp-Source: AGHT+IHRKFpSHbnV1ZcFlHQmT8/U6nDVNt9x6aSrpW0Swv5ecROtIF0njPX77NGK6mPNVYDj8/GB X-Received: by 2002:a17:906:140a:b0:a3e:ce5a:bba5 with SMTP id p10-20020a170906140a00b00a3ece5abba5mr770683ejc.60.1708680000461; Fri, 23 Feb 2024 01:20:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708680000; cv=pass; d=google.com; s=arc-20160816; b=dRJKvxiVf+KUP1GZtescIpZo+RR4CCQbHIAfgmquMe6KCFravmD7/3W5XXh0pya02F /35Snfdipl/5A7JRwj1Mx+9lpN8PkvkM3a6ox/CDI4RnCohSBuod6loJCnDz7enRixE7 uIAxh99DlGo9dIHX7yD/uAXMx+TmMRtcUT0r7kAP3R3mFlyCXMAIYueJr11ZS+XYNXej CltSOtaWf596pbH6JOMpkPSJU3jyCdQdhC48+X5lxLxlSpUO5WrawHQFK1bPJR8GRFFy 6n514Jm2mR+0wRf0yuGzBaxmjxGQjuRvMnS5bSzqxJ/Lnm9WM35Ovqr2b1OREnnLeCD1 n5WQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=/BPPEt6FiV7taMp0gEkZlavYin7opKKjsfbUHt1F9nI=; fh=VvS/3wpzBWtXeGWzAoODk7k3kFIqs/DHlycSZjyFdzI=; b=wnGj66msT+/MdhKW/OXCHnFtrL+0ypmZHMof8kztAdv116B9VuErkYIcZKLMQ3uuSU 5K8qOPuXoobFA7mMR5Ah4XBZZwD9LZX8HOM/bgNSPIhw3MRpygNMQuSRoqhlJMV2zGVy 5RDlJtZzgDnN0nthJVHv13QGiF6aj0CCLgBs8Tv5UwsttunIvkNfvIRn4h3JXgYT2reo +9C01p/s1IYAWU75Rlb4ublCQT8G5VCMBOwp29ZPmKjIIodxfj7cIOn/jVxxQvE+3ZRw QeW2ntn1gncVG+8RAA1JWpctXrgaWlzPoT4qm9X/sObzoQGO615D5EaVJ7hDS2Tunift K52A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=alpha.franken.de); spf=pass (google.com: domain of linux-kernel+bounces-77997-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77997-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id jj16-20020a170907985000b00a3ee77a885esi3380198ejc.819.2024.02.23.01.20.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 01:20:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77997-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=alpha.franken.de); spf=pass (google.com: domain of linux-kernel+bounces-77997-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77997-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 35B5B1F221C9 for ; Fri, 23 Feb 2024 09:20:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 275D05CDE8; Fri, 23 Feb 2024 09:19:30 +0000 (UTC) Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE5455C8E3; Fri, 23 Feb 2024 09:19:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.175.24.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708679969; cv=none; b=Jhb+yuGufTpRYZ4jS76Mhcyu0LECz+4/XzfFNKZoU/6AeGdM2ozPHaicXXUUWIlFhxxRz9BOscMwvJ/n7dORcoWCsoRSmRuLbvgvq3+Rba5VSuQyaga+d+KqYchnmIZYU5uSb6ECTsurtrMO55nVSCiefqgQGe02C0V5h3kWIes= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708679969; c=relaxed/simple; bh=mqL0eakhk7VpDDSz5MotaLvd3eO0HeCgpKFAvIq9lmg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bC9o58o+mVrsXlcyuZgfuw+m1N7zITuBPTbszcLN1vkj95gL7tZ2Lmh+ZvFALaCbtf9G9U36Fc1gPCCli10r4mssF0vQsFlAYsjhqrsnnJFKCN9vnkhQ/w221N/ILBJoy+Zi2qabLGq1V0H1G+LO8uTqNDcePUHA9n4aO/w5OIA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de; spf=pass smtp.mailfrom=alpha.franken.de; arc=none smtp.client-ip=193.175.24.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alpha.franken.de Received: from uucp by elvis.franken.de with local-rmail (Exim 3.36 #1) id 1rdRi6-0003JF-00; Fri, 23 Feb 2024 10:19:14 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id BD759C069B; Fri, 23 Feb 2024 10:18:38 +0100 (CET) Date: Fri, 23 Feb 2024 10:18:38 +0100 From: Thomas Bogendoerfer To: Serge Semin Cc: Greg Kroah-Hartman , Jiri Slaby , Arnd Bergmann , Jiaxun Yang , Alexey Malahov , Stephen Rothwell , Andrew Morton , linux-mips@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/4] tty: mips_ejtag_fdc: Fix passing incompatible pointer type warning Message-ID: References: <20240215171740.14550-1-fancer.lancer@gmail.com> <20240215171740.14550-5-fancer.lancer@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240215171740.14550-5-fancer.lancer@gmail.com> On Thu, Feb 15, 2024 at 08:17:29PM +0300, Serge Semin wrote: > mips_ejtag_fdc_encode() method expects having a first argument passed of > the "u8 **" type, meanwhile the driver passes the "const char **" type. > That causes the next build-warning: > > drivers/tty/mips_ejtag_fdc.c: In function ‘mips_ejtag_fdc_console_write’: > drivers/tty/mips_ejtag_fdc.c:343:32: error: passing argument 1 of ‘mips_ejtag_fdc_encode’ from incompatible pointer type [-Werror=incompatible-pointer-types] > word = mips_ejtag_fdc_encode(&buf_ptr, &buf_len, 1); > ^ > drivers/tty/mips_ejtag_fdc.c:216:24: note: expected ‘const u8 ** {aka const unsigned char **}’ but argument is of type ‘const char **’ > static struct fdc_word mips_ejtag_fdc_encode(const u8 **ptrs, > ^~~~~~~~~~~~~~~~~~~~~ > > Fix it by altering the type of the pointer which is passed to the > mips_ejtag_fdc_encode() method. > > Fixes: ce7cbd9a6c81 ("tty: mips_ejtag_fdc: use u8 for character pointers") > Signed-off-by: Serge Semin > --- > drivers/tty/mips_ejtag_fdc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/mips_ejtag_fdc.c b/drivers/tty/mips_ejtag_fdc.c > index aac80b69a069..afbf7738c7c4 100644 > --- a/drivers/tty/mips_ejtag_fdc.c > +++ b/drivers/tty/mips_ejtag_fdc.c > @@ -309,7 +309,7 @@ static void mips_ejtag_fdc_console_write(struct console *c, const char *s, > unsigned int i, buf_len, cpu; > bool done_cr = false; > char buf[4]; > - const char *buf_ptr = buf; > + const u8 *buf_ptr = buf; > /* Number of bytes of input data encoded up to each byte in buf */ > u8 inc[4]; applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]