Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp850060iof; Mon, 6 Jun 2022 13:48:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkKQOeNSzBo9fgWogY/NnCix4HUz235y19lDAkvDC4kw4dl2qzUjYJyxCuo0XeXk3im9E4 X-Received: by 2002:a17:90b:3b46:b0:1e2:f8a2:cd03 with SMTP id ot6-20020a17090b3b4600b001e2f8a2cd03mr28603700pjb.229.1654548499273; Mon, 06 Jun 2022 13:48:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654548499; cv=none; d=google.com; s=arc-20160816; b=YXtJmRf/FCH1IWc/c8CnVKxvItRQRBaSbpx+1dgJpZn68VwkaXO8k+qC1Y3G74K6Sc tnRWJeZyTzOUi761vW8ruJXZ9rb4zpeb+4mxKfPBVkBbhHuUR4yyGvom7r4yGhYsYRRQ hV010f/7EFAgcOLOMrxZdesEz1nktFQLp+l+WfrUPRmzxcd+p97P7uyb93jWFJra5wID XRRSwzi5IPob+1/DdCEqPuESmLxUWmXwzBbwYu8oiX7YwUEJKBPZhAkpUHqle2lbgDVl W99tUMSl4/yH50BPr7FN2xEvTsD/MDkOI1cZUcNHPhe599IfyPbKJDp5QlFlUA7V9MW2 P5tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=nIz93hX2PQ4fhuhp1jMpyp0wJt0SBYcIreMeL3lWdNY=; b=iNR57Q+gBP6W9VCuU93EXvMo/yfXB51N4ioUof0iGAuJG+KtDfUasKfX8+T3gAk9ah 3DphUrG7gj7u1FW8FuUGYJGH5K7ZU7UrdBm82RJopyN6/odh+WGmmfBQPlTQsSl/KZzC Y135sJsuDS9jErWOc+Rjbf77+Z+j1DdfMUPNqXQ2P6jorH8Aj9NjQ+KQT+em6L06/atC uYi7SDfnoasJbxroI9W9v0hAIXt5B+LcptbP4Y0mqHY5ViXHS7Me/0+PPXKM+wvpqg4W YMBLjgPv3VwwJj54WA2A+rpP304Rt1tRreuD/aqthMqGngj3zjzsR7fJ1umGJVqOwJz+ hhtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PRIGkpN6; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lp1-20020a17090b4a8100b001e85702b5a3si12227647pjb.7.2022.06.06.13.48.06; Mon, 06 Jun 2022 13:48:19 -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=@gmail.com header.s=20210112 header.b=PRIGkpN6; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231524AbiFFS5m (ORCPT + 99 others); Mon, 6 Jun 2022 14:57:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231641AbiFFS5i (ORCPT ); Mon, 6 Jun 2022 14:57:38 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24B49220D8 for ; Mon, 6 Jun 2022 11:57:37 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id w20so3110577lfa.11 for ; Mon, 06 Jun 2022 11:57:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=nIz93hX2PQ4fhuhp1jMpyp0wJt0SBYcIreMeL3lWdNY=; b=PRIGkpN6xE0WkLxBRa2NL7ikMvENhq0/W55wukWNbpiU5svpBNZQqC3XEupJcPPfWc 8oppZyUKGVgquZiSnv7aXlI71ZyA1ATmq3KM6WsUkuXABCAhWKZgSHOmOsT4/8+npwnV dm1E6BMsMN8PeZlNbmP2wTeSsOYhopNqqKCjafSDXtQgKgvFDV8TnCLqvTVYHJQqCgiw UnfNTnPTzdEFtr9VD2VM3K1a/ylB90PlmfekQovRqINRFzVjmOJVDycsUy0URUX0P+Io MVdDg8BuazsCqpyUpeO3UtMWBfNuLkCaFmWyhwje5onPTPKLjkC67pyPAQYWfiQmYOdD rebw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=nIz93hX2PQ4fhuhp1jMpyp0wJt0SBYcIreMeL3lWdNY=; b=CrJDyJdMsWcRNDqwQxiwe9N/z4QHclIwB31QiJUb77ATtmBz8DM/USz6wgBqONgeZo rhrbn5UabDdww0Cr2yIXr4kBZ6xmW5Bdst+VSl/UBzpJEfiYaSp0RO9dvEFU87PCxRZL d6tPK2hfhB1CEgPoeCk8eA5i4g4qYKc6ve9VppAEXEtQ9moNM+beiCfTfCM7rQEBknty FG9r0IdyH/7kxmVd6lvb/EY3gorM1WHjfp2buYUKdc7SErMTr0bYVnb6Sr6wA/nrZXKr 3rKHfmiZPrhpaiqG8WZNvGTPWguse7+4stW7opDR8zViukATLS8ez99fW01WmDmlJXFB yVxw== X-Gm-Message-State: AOAM530iTsZn+mRX7gOAxb9CV2PuUSNtbR5eu30JKyoJBnCo7Bzj2ZYU jedpSER0PSYhxT8cVxHLMhg= X-Received: by 2002:a05:6512:e90:b0:477:cc44:9813 with SMTP id bi16-20020a0565120e9000b00477cc449813mr16943484lfb.226.1654541855259; Mon, 06 Jun 2022 11:57:35 -0700 (PDT) Received: from [192.168.1.11] ([94.103.229.27]) by smtp.gmail.com with ESMTPSA id w10-20020ac2442a000000b0047255d211b2sm2953285lfl.225.2022.06.06.11.57.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Jun 2022 11:57:34 -0700 (PDT) Message-ID: <5d57d0f5-06bd-5e3a-2cb9-d8ae531e453e@gmail.com> Date: Mon, 6 Jun 2022 21:57:32 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v2 1/4] staging: r8188eu: add error handling of rtw_read8 Content-Language: en-US To: Greg KH Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk, straube.linux@gmail.com, dan.carpenter@oracle.com, fmdefrancesco@gmail.com, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev References: <541ab3341093a8f6bff1cf8e8aa0c7e247ff4833.1652994483.git.paskripkin@gmail.com> From: Pavel Skripkin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi Greg, On 6/6/22 08:48, Greg KH wrote: >> - rtw_read8(padapter, REG_FMETHR); >> + /* FIXME: should this read be removed? */ >> + res = rtw_read8(padapter, REG_FMETHR, ®); >> + (void)res; > > What is that? We don't do "empty" lines like this in the kernel for no > good reason. If the return value must be checked, then that's fine, but > don't do it this way. Shouldn't the function itself return an error? > > And reading a value is sometimes required by hardware in order to have > the write call go through. But that's for PCI devices, not normally USB > devices, but we could be wrong. I wouldn't put a FIXME in here unless > you have some plan for how to eventually solve it, otherwise someone > might just drop it without knowing why the FIXME was ever added. > > Ok, I will just make this function return an error. Thanks [snip] >> >> diff --git a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c >> index b944c8071a3b..a5b7980dfcee 100644 >> --- a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c >> +++ b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c >> @@ -463,6 +463,7 @@ void _PHY_SaveADDARegisters(struct adapter *adapt, u32 *ADDAReg, u32 *ADDABackup >> } >> } >> >> +/* FIXME: return an error to caller */ > > When are these FIXME going to be resolved? I don't like adding them for > no good reason. > After this series will go in. I really don't want to make this series huge, since ideally read errors should be passed up to callers. This driver has a lot of very deep call-chains, so fixing them in one series is just unreal I have a plan to address these FIXMEs, that's why I've planted them. thanks for review, With regards, Pavel Skripkin