Message ID | 20221024162756.535776-1-Jason@zx2c4.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp585110wru; Mon, 24 Oct 2022 11:07:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5q6Qkihj20otI5rEnn9cGS3Z4w2w/BIzohrsdQ8rnc43VEkek9tiPE/Y+3x1oIUoAaUocI X-Received: by 2002:a17:907:a40f:b0:790:540c:b6e3 with SMTP id sg15-20020a170907a40f00b00790540cb6e3mr28872046ejc.41.1666634848457; Mon, 24 Oct 2022 11:07:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666634848; cv=none; d=google.com; s=arc-20160816; b=ezgzPNDD8S9na7avAaNRWEgMRApCk6RQ+ogkHXHCJeBQ7EhfYRFxFPYz7WLDcqtREG zZyGKAufokMKvPHaGborljr8IzftlcM/pT4jJcoHA3ctNgdUtjRjx1UZFWsSXB8Im1El SxiN+vfy/79b/YnDTNaKUGS2kAbOfNAPFa4jXHFsejt0PA0Tp/pGoosX8A+ovtLZRJ3+ 9vwmkL9miBP97KLIwj0PlCBwAI4kmxKt/IoiSF+yK2umTpzmm7xE5USyOZL0v2DDguLW yBNK9M/c28QES/lJEC9B9rINIqmbalWVvBdXKHbrrDuE8WgF4c+3tPzJ7cboC8JTa5Bj Pjzg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=yXR2T4bKtKjydDynr+Vr9b65mU0cPS5K9cCzVDVGo90=; b=PN1S/aVHurxfiE7wNWSArSDHLiciRWZAJMOC0Ti8PO+V19Af4+TYrDwz7b7Sb05Qen IcqbxnYjCZtJl08MLDGWijZFIcPl9Eu+l9ZAMbXr0nR5dTRu7V7310c94kyK+p4wEvGd PXP4tVQAEgrDZx3Du9RVSt+0L5gsuhu2CxsWN1OWEnDI7UOblohfh0CKrihDiloFZ3pq OyWy6UO41uwd3BU1cR4QM2bv52YWJEd3qmdenZ3F9ecMdwZ5fWKpStfS0eLkfUmikdCk h8F9n/4o1/3bpfZt0OdNSb4nldL+4h5i98P/g2fKz2sGCLRLxvo2AOGQ9N5j1XyxmA9Y lXdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=KLTUPYFc; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f22-20020a0564021e9600b0045d292ef641si399193edf.493.2022.10.24.11.07.03; Mon, 24 Oct 2022 11:07:28 -0700 (PDT) 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; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=KLTUPYFc; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229576AbiJXR7X (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Mon, 24 Oct 2022 13:59:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233287AbiJXR7E (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 24 Oct 2022 13:59:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CE7AEB74B; Mon, 24 Oct 2022 09:39:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4141861489; Mon, 24 Oct 2022 16:28:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27D52C433C1; Mon, 24 Oct 2022 16:28:18 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="KLTUPYFc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1666628896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=yXR2T4bKtKjydDynr+Vr9b65mU0cPS5K9cCzVDVGo90=; b=KLTUPYFcu5JICSiD8S+dP8u+6i9CaL5swdpSgj5U2Fpqi2Foxt4n6/O9jR6xA7iHyqNpnb 184FkoH80FpqD52JA4RN8Pkns4bJiada6PkCePvYzmd3Z4dqnc7gfN43km2/UZOuCWqMKE X5fCKOrH3OejTyACQTg5PWxCbikDOVg= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id c97529a7 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 24 Oct 2022 16:28:15 +0000 (UTC) From: "Jason A. Donenfeld" <Jason@zx2c4.com> To: linux-kernel@vger.kernel.org Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, linux-media@vger.kernel.org Subject: [PATCH] media: stv0288: use explicitly signed char Date: Mon, 24 Oct 2022 18:27:56 +0200 Message-Id: <20221024162756.535776-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747593302749905906?= X-GMAIL-MSGID: =?utf-8?q?1747593302749905906?= |
Series |
media: stv0288: use explicitly signed char
|
|
Commit Message
Jason A. Donenfeld
Oct. 24, 2022, 4:27 p.m. UTC
With char becoming unsigned by default, and with `char` alone being
ambiguous and based on architecture, signed chars need to be marked
explicitly as such. Use `s8` and `u8` types here, since that's what
surrounding code does. This fixes:
drivers/media/dvb-frontends/stv0288.c:471 stv0288_set_frontend() warn: assigning (-9) to unsigned variable 'tm'
drivers/media/dvb-frontends/stv0288.c:471 stv0288_set_frontend() warn: we never enter this loop
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
drivers/media/dvb-frontends/stv0288.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Comments
Hi Mauro, On Mon, Oct 24, 2022 at 6:28 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > With char becoming unsigned by default, and with `char` alone being > ambiguous and based on architecture, signed chars need to be marked > explicitly as such. Use `s8` and `u8` types here, since that's what > surrounding code does. This fixes: > > drivers/media/dvb-frontends/stv0288.c:471 stv0288_set_frontend() warn: assigning (-9) to unsigned variable 'tm' > drivers/media/dvb-frontends/stv0288.c:471 stv0288_set_frontend() warn: we never enter this loop > > Cc: Mauro Carvalho Chehab <mchehab@kernel.org> > Cc: linux-media@vger.kernel.org > Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Was wondering whether you planned on taking this into your tree as a 6.1 fix for Linus for rc4? Thanks, Jason
Hi Mauro, On Wed, Nov 2, 2022 at 3:47 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > Hi Mauro, > > On Mon, Oct 24, 2022 at 6:28 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > With char becoming unsigned by default, and with `char` alone being > > ambiguous and based on architecture, signed chars need to be marked > > explicitly as such. Use `s8` and `u8` types here, since that's what > > surrounding code does. This fixes: > > > > drivers/media/dvb-frontends/stv0288.c:471 stv0288_set_frontend() warn: assigning (-9) to unsigned variable 'tm' > > drivers/media/dvb-frontends/stv0288.c:471 stv0288_set_frontend() warn: we never enter this loop > > > > Cc: Mauro Carvalho Chehab <mchehab@kernel.org> > > Cc: linux-media@vger.kernel.org > > Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> > > Was wondering whether you planned on taking this into your tree as a > 6.1 fix for Linus for rc4? Thought I should follow up with you about this again. Thanks, Jason
diff --git a/drivers/media/dvb-frontends/stv0288.c b/drivers/media/dvb-frontends/stv0288.c index 3d54a0ec86af..3ae1f3a2f142 100644 --- a/drivers/media/dvb-frontends/stv0288.c +++ b/drivers/media/dvb-frontends/stv0288.c @@ -440,9 +440,8 @@ static int stv0288_set_frontend(struct dvb_frontend *fe) struct stv0288_state *state = fe->demodulator_priv; struct dtv_frontend_properties *c = &fe->dtv_property_cache; - char tm; - unsigned char tda[3]; - u8 reg, time_out = 0; + u8 tda[3], reg, time_out = 0; + s8 tm; dprintk("%s : FE_SET_FRONTEND\n", __func__);