Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp761497pxb; Wed, 27 Oct 2021 11:53:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEhFBQJBuE5p3FE0LS7IxFqmEq1u/uYvmYb/UbCFPi5sXEWXn5RAftOqm0IXLaCfO/kO6a X-Received: by 2002:a05:6402:d76:: with SMTP id ec54mr9629120edb.7.1635360826963; Wed, 27 Oct 2021 11:53:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635360826; cv=none; d=google.com; s=arc-20160816; b=obtfq6AMQdWAFC2+Y09jcWSopz9QDReU3k8IZC+3UFulneXnw/Jqy6FcIxMCo0OeTe 4jchOkTD3qQtfUjieoAyb5dJY/RKZXP4upy9Nh3ck2c2ZJjzuFL8tCCounpEQt7NxUFL IuBigV8bXcEGQ+xVZpyPhBAY693Q/LP2gsPd7TVUD9Fz9h/zPiQXHItmOrukPymbqTLu SITgj09o4u68HRkHWwkClu22RwbV+567EIA+QpcJPSqCHK/41gzwtuogB9UGNamiExp3 OXnhmhzsXkh5vm2A8hueR90yCTJhwoCYmaD5T+5c2kxrrkvQhuGa7d4AoXEejKopOfuA cq7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dmarc-filter:sender:dkim-signature; bh=z6IQuzopc3OVYw9ggWC3VpZb1xFK8Eb3iFzXALZjgj0=; b=o7dG5aFtYHIfK/3kIlARLGOKYOzjjurz3ky0zR1xWWFUgcPUiAojvmV9BbH4ydhNkF WqZb0EdteRM1vTMgk7981uiI4GX4NxiUhUY/4zdN+ks53yGkUzXT/6wDEkRQrnkd4a/G CpxMW91R74G39SqzJ1i8KWwtgv6/srmJ7XxxPov0LqeyJnSA/ba0E899sCpMbtjLxpaJ LwFKFy0feKb10bv2hMtDyecEaGkNMxCUqIYV7yjWXOGPyHHl2/1XJgJ1s0OXwc4bdxS2 +iLtZLmGTZUAOQxr3zO9vS+8HzQhHP5phrfUDs6Ga+RcEcHmBGxI32QQDI7HfLwylzyj Ew4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=f48DYlyF; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 hb43si913046ejc.773.2021.10.27.11.53.29; Wed, 27 Oct 2021 11:53:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=f48DYlyF; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238692AbhJ0Hjx (ORCPT + 67 others); Wed, 27 Oct 2021 03:39:53 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:55375 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238693AbhJ0Hjw (ORCPT ); Wed, 27 Oct 2021 03:39:52 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1635320247; h=Date: Message-ID: Cc: To: References: In-Reply-To: From: Subject: Content-Transfer-Encoding: MIME-Version: Content-Type: Sender; bh=z6IQuzopc3OVYw9ggWC3VpZb1xFK8Eb3iFzXALZjgj0=; b=f48DYlyFA+jhw8LyfM82ONKePnqnuwI/kwH9ixdPf+BftDT/JkJahfCNuoKupTizL1jG6e10 Zb4706HrNH2YgJ9ydUM2TP4soe9dZmL7pIETkZEAXWmI5gZTLWl3l+mn3+edn3qtgqESrpG2 kHw0GLA/HY9pdwaDKaoQbGeptbk= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n02.prod.us-west-2.postgun.com with SMTP id 617901b15ca800b6c1c8be0a (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 27 Oct 2021 07:37:21 GMT Sender: kvalo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id E7C37C43617; Wed, 27 Oct 2021 07:37:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=2.0 tests=ALL_TRUSTED,BAYES_00, MISSING_DATE,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from tykki.adurom.net (tynnyri.adurom.net [51.15.11.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8F196C4338F; Wed, 27 Oct 2021 07:37:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 8F196C4338F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH wireless-drivers-next] rtw89: fix return value in hfc_pub_cfg_chk From: Kalle Valo In-Reply-To: References: To: Kevin Lo Cc: linux-wireless@vger.kernel.org, Pkshih User-Agent: pwcli/0.1.0-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <163532023368.30745.12468473810176045324.kvalo@codeaurora.org> Date: Wed, 27 Oct 2021 07:37:20 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Kevin Lo wrote: > It seems to me when pub_cfg->grp0 + pub_cfg->grp1 != pub_cfg->pub_max is true, > it should return -EFAULT rather than 0. Otherwise, the function doesn't need > to exist. > > Signed-off-by: Kevin Lo > Acked-by: Ping-Ke Shih > > diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c > index 69384c43c046..afcd07ab1de7 100644 > --- a/drivers/net/wireless/realtek/rtw89/mac.c > +++ b/drivers/net/wireless/realtek/rtw89/mac.c > @@ -560,7 +560,7 @@ static int hfc_pub_cfg_chk(struct rtw89_dev *rtwdev) > const struct rtw89_hfc_pub_cfg *pub_cfg = ¶m->pub_cfg; > > if (pub_cfg->grp0 + pub_cfg->grp1 != pub_cfg->pub_max) > - return 0; > + return -EFAULT; > > return 0; > } Patch applied to wireless-drivers-next.git, thanks. c6477cb23704 rtw89: fix return value in hfc_pub_cfg_chk -- https://patchwork.kernel.org/project/linux-wireless/patch/YXEJey8lKksAZif4@ns.kevlo.org/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches