Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2281084rwb; Fri, 11 Nov 2022 07:22:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf6eihAh+jPlEQu6aOhcsPL95L4jZax/To0U7u8Hinx+EANSDUHjIO0DBGYmBqjCzzOPTXWp X-Received: by 2002:a17:906:1b4f:b0:7ad:a030:4816 with SMTP id p15-20020a1709061b4f00b007ada0304816mr2127407ejg.765.1668180155679; Fri, 11 Nov 2022 07:22:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668180155; cv=none; d=google.com; s=arc-20160816; b=t/4YNkPlHwwFfox6aBDtwTD9BaeIfn19ZnSVeyzJvyCcG2CZmIlrZvMaKOQTWaxPTv qGoeyBpDL9v75ICS5iUPYPI0KYqmBVDsbOMfi38KS0bLGXWs68gaV/AKY/bIhOYjfTvB scjSjbC2osGRZRn+A0erHU3uqajZ4CDWK7+XlA2/5MWDRFT9oSIYZpZoNhUR9F+07l0J SosUmrSie99PfOG7nCZ1vKbB1uXkbhglJ1o9JNwPR+H9zSCR+rryjcnygfjg3OyYvAU1 QObt8JYs0dTt4cTh1eUkdxFNJKEF5duESXLJ5XQ236YWT38OXfVny0/2+RlmLHRs5Ye1 Hptw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Gj+KOgZE/Y4jht/8L/j8A8ZHXkovJ7Akyk96PCV+jEU=; b=VC2dliEUKni9hNwUw73YTrtQZHZlGMbJY89JAPWd7eJPGWed8IxyQdES3dZcEAwFtM tLJ+f749hvgSCasWsKqqse1YrQRcZg4zoCPAMQ4Vr2KNpQ7/IWFqjRPvZjuqnOuTEE0z O+qfcFdIneAVGHmBeNHWEtxLUpvf+2iJBr7C7nE9XC+xX81zXgjy3kEiFy/2tLVCayYP jAIDNKDYmeLaQ1s9DOoKly/lPKdvM2PzB4n9hLmf5WSMvIUjeWZGtJW+yrLhFHBfQZ8Q PsxznsYEjrdMUpJ6K5300PotknYsV7pqACKbP612aq1wDIERP39M8DQjRyoBlqmq6Grk /W5w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs21-20020a170906dc9500b007ae86742c39si2422178ejc.504.2022.11.11.07.22.06; Fri, 11 Nov 2022 07:22:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234925AbiKKPJG (ORCPT + 91 others); Fri, 11 Nov 2022 10:09:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234903AbiKKPID (ORCPT ); Fri, 11 Nov 2022 10:08:03 -0500 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AC83A6A771; Fri, 11 Nov 2022 07:06:46 -0800 (PST) Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1otVcD-00037d-04; Fri, 11 Nov 2022 16:06:45 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id 86DD8C11F2; Fri, 11 Nov 2022 16:05:19 +0100 (CET) Date: Fri, 11 Nov 2022 16:05:19 +0100 From: Thomas Bogendoerfer To: "Jason A. Donenfeld" Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] MIPS: pic32: treat port as signed integer Message-ID: <20221111150519.GE13465@alpha.franken.de> References: <20221028132344.1993934-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221028132344.1993934-1-Jason@zx2c4.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 28, 2022 at 03:23:44PM +0200, Jason A. Donenfeld wrote: > get_port_from_cmdline() returns an int, yet is assigned to a char, which > is wrong in its own right, but also, with char becoming unsigned, this > poses problems, because -1 is used as an error value. Further > complicating things, fw_init_early_console() is only ever called with a > -1 argument. Fix this up by removing the unused argument from > fw_init_early_console() and treating port as a proper signed integer. > > Cc: Thomas Bogendoerfer > Signed-off-by: Jason A. Donenfeld > --- > Thomas - this is part of the -funsigned-char work I've been accumulating > in my unsigned-char branch. If you want to take this as a fix for 6.1, > go ahead. Otherwise, Linus asked me to keep the 6.2 unsigned-char > patches together in my branch, so I'll take this, pending your Ack. > -Jason > > arch/mips/include/asm/fw/fw.h | 2 +- > arch/mips/pic32/pic32mzda/early_console.c | 13 ++++++------- > arch/mips/pic32/pic32mzda/init.c | 2 +- > 3 files changed, 8 insertions(+), 9 deletions(-) applied to mips-fixes. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]