Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8808015rwi; Tue, 25 Oct 2022 11:03:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6MxvWANcoU+o+/OlBd8S/167x0zY3xuirpDpOvSb7587Whslx2QyhktyR/QPcGjcaPU+0V X-Received: by 2002:a05:6402:500d:b0:459:3e56:e6f9 with SMTP id p13-20020a056402500d00b004593e56e6f9mr37783727eda.367.1666721019210; Tue, 25 Oct 2022 11:03:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666721019; cv=none; d=google.com; s=arc-20160816; b=gihYVYTnNvPmi1vbGQqd5vmEXmuMDNvULyldM9GTKxuFP/dvoldXUoSd0PJVBtQp+n 9dkQVgdD6+yt028KXgvxBTAMkVKsnPj4FwrJocvy4+R8mttLJIasYnoZjwk+Vvcz4Fne xdLheplBW9lAIFg5jyriDKIYoFPE+JabWiZHi646/l5Jp8KNVvCTq8mNNGLhOKfOuI/c o38mplF0eGesFDnSVSG819YWgrdVYw+XffEBAFv5trIC7L85Oq2/bhWvT+3U7I3ylc+d Qsb3QtNcuR/R6GJkTOkV1MJr+z2z/vnDGheXe8uFYN0JefK/Z5PY93BN9WDZ/LVLVJ2q kDaA== 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=+vJqwIUPfAcqJps/uK/0x+HfmEw2EsJ0Z503zsGHjAE=; b=zDfoIc4ZdFc8LHgvsT9qEIzCN89BiayU/F0nEPjW+H2UohbZ3ufvlcHfuUQF1nYPfV wEijjmii5n3v6bzYDPYi56zQatxnJ0/2X9bPAj8cchJgpmrrKabsGRYaDDdO93X5Ohri CzfkpkWTGTtM1aTD4DtNVmQEL7K8S0qRe/RETdIT6R0cvn1mtygLs4xb/CSYBV1MfldE BZOQxaEgFwZhOYjFUzaUgQm9nf+JPpazPpu46496I6A9GMEDGEeeeZNl+dgejgEbARLU f0dOQ6eYr3er47ui4HUgQgXuG8VMt+Bhm7PbsInRMpK5GPwnP6KKM/LFi2j+3UkGsuga 0Frg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=bCMiDkUU; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb21-20020a1709077e9500b00779c6c57dbfsi3591581ejc.556.2022.10.25.11.03.19; Tue, 25 Oct 2022 11:03:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=bCMiDkUU; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-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 S232214AbiJYRnv (ORCPT + 65 others); Tue, 25 Oct 2022 13:43:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231449AbiJYRnt (ORCPT ); Tue, 25 Oct 2022 13:43:49 -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 0214517C54F; Tue, 25 Oct 2022 10:43:49 -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 9361D61A8A; Tue, 25 Oct 2022 17:43:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E6EBC433B5; Tue, 25 Oct 2022 17:43:47 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="bCMiDkUU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1666719822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+vJqwIUPfAcqJps/uK/0x+HfmEw2EsJ0Z503zsGHjAE=; b=bCMiDkUUCC9d0WnRGLv1xiyGLAPwaxUYFEiqt0HcJk/a3H+WAYOroflUSHjPKuiMdNJUSv GQ4lsCGq31J4mvc3stEmjpUdFocQNRafbJZ+GiM1YWb4kxNCvfEnwu9TeeMofiW9kbL2W3 vA17yh7AvPbrRPLEoA07WQXHSNWgy3E= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 9f21ff14 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 25 Oct 2022 17:43:42 +0000 (UTC) Received: by mail-vk1-f171.google.com with SMTP id t85so5786450vkb.7; Tue, 25 Oct 2022 10:43:41 -0700 (PDT) X-Gm-Message-State: ACrzQf3IPD+BkUHO7dS8h26hsqvX+bmkt+5DdL5NDnLDzAgYN7Yp/Gj1 +bcvFK30K1GQ5IjkloeYDWA/1in74PoAYP2nDPo= X-Received: by 2002:a05:6122:317:b0:3b7:6590:daa1 with SMTP id c23-20020a056122031700b003b76590daa1mr5369383vko.37.1666719821023; Tue, 25 Oct 2022 10:43:41 -0700 (PDT) MIME-Version: 1.0 References: <20221025122150.583617-1-Jason@zx2c4.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Tue, 25 Oct 2022 19:43:29 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] staging: rtl8192e: remove bogus ssid character sign test To: Philipp Hortmann Cc: linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, dan.carpenter@oracle.com, gregkh@linuxfoundation.org, kvalo@kernel.org, linux-wireless@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.7 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,URIBL_BLOCKED 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-wireless@vger.kernel.org On Tue, Oct 25, 2022 at 7:35 PM Philipp Hortmann wrote: > > On 10/25/22 14:21, Jason A. Donenfeld wrote: > > This error triggers on some architectures with unsigned `char` types: > > > > drivers/staging/rtl8192e/rtllib_softmac_wx.c:459 rtllib_wx_set_essid() warn: impossible condition '(extra[i] < 0) => (0-255 < 0)' > > > > But actually, the entire test is bogus, as ssids don't have any sign > > validity rules like that. So just remove this check look all together. > > > > Cc: Greg Kroah-Hartman > > Cc: linux-staging@lists.linux.dev > > Signed-off-by: Jason A. Donenfeld > > --- > > Changes v1->v2: > > - Remove ssid sign test entirely rather than casting to `s8 *`. > > > > drivers/staging/rtl8192e/rtllib_softmac_wx.c | 9 +-------- > > 1 file changed, 1 insertion(+), 8 deletions(-) > > > > diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c > > index f9589c5b62ba..1e5ad3b476ef 100644 > > --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c > > +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c > > @@ -439,7 +439,7 @@ int rtllib_wx_set_essid(struct rtllib_device *ieee, > > union iwreq_data *wrqu, char *extra) > > { > > > > - int ret = 0, len, i; > > + int ret = 0, len; > > short proto_started; > > unsigned long flags; > > > > @@ -455,13 +455,6 @@ int rtllib_wx_set_essid(struct rtllib_device *ieee, > > goto out; > > } > > > > - for (i = 0; i < len; i++) { > > - if (extra[i] < 0) { > > - ret = -1; > > - goto out; > > - } > > - } > > - > > if (proto_started) > > rtllib_stop_protocol(ieee, true); > > This patch cannot be applied on: > [PATCH] staging: rtl8192e: use explicitly signed char They're mutually exclusive, which is why this one here was marked as a v2 and sent in reply to that one. Greg picked up the v2 and all is well. Jason