Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp144324pxb; Wed, 6 Oct 2021 01:36:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUPjUKhNozqjE88jRADA+vSUtZjc/wDDhclitOXHV0h0OGQMymK1d9GzdbMB1yB8ZROkan X-Received: by 2002:a17:903:3014:b0:13e:95d6:a6d8 with SMTP id o20-20020a170903301400b0013e95d6a6d8mr9576413pla.69.1633509383593; Wed, 06 Oct 2021 01:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633509383; cv=none; d=google.com; s=arc-20160816; b=DrniS7DSZ912638CsplVcv6NvYTMxLY0xxPGr0Mk7dTkLtDEU6Y5dOMyO5hsxChVZ2 0ULooTPFHcawr4mFDsz1JnSVWBSQG6+ei/4blpqJDPSLHishKmq1SwfdsEkJeLmHFVOa +Noke6fPjTqRPraR8FMjx/2s6tNKePWi3CHCDYqRZ0Bq0DY+K/vHHz862ZWi+H8AUJiV +hbo8aZ21Qiooob+Lyw+TMzNgs9g038BhhyKpjd64GXOelq3S0Z4XT4u7UCgzdYyWO/6 JU4dhpV9N0yXqR3ZhqTIbMSykA0RTY7DcE9JHOyci2X59s1/wgHi1o2tYoHuqjjMSSxF 5sxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ZJbLBPr1+liHbb+iV/HNQ+Qx4VBBrx3WC7HECwMcyUA=; b=mb+BMRtqVzZEG9m8yFIHknZCG3QoMQlHfpvoRPzOyacx+oN4gKQxrBsvJjkYd62j4a n5vnvxQIaY1npwMU6Vokyngjuwfb/3nONH5apClaHQjz3W8x4ekbyCbVgceRa9UMblxu wmX9qI7xR/B80LjRgz9JQdwW6nEujsRGwNfmQCPkBbqJLUHBv0JrZC0b7S0Ix6heYZ6k xgP4nOrNWCYwyt9oHnejvZ1I6fPahfSrh09iS+QSZkXR30/V5etq3awA1MxSuDUiZo6+ RLtHBTZlCLyzse0TeU8mA1+XKDGPcfCqjERIAkc7v/IIYrxNbYWM4/c8+A5Wgxfb/a6A YpIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 k35si4690803pja.190.2021.10.06.01.36.10; Wed, 06 Oct 2021 01:36:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237719AbhJFIgR (ORCPT + 99 others); Wed, 6 Oct 2021 04:36:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237593AbhJFIgQ (ORCPT ); Wed, 6 Oct 2021 04:36:16 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13572C061749 for ; Wed, 6 Oct 2021 01:34:25 -0700 (PDT) Received: from martin by viti.kaiser.cx with local (Exim 4.89) (envelope-from ) id 1mY2NX-0006Oj-AJ; Wed, 06 Oct 2021 10:34:19 +0200 Date: Wed, 6 Oct 2021 10:34:19 +0200 From: Martin Kaiser To: Michael Straube Cc: Greg Kroah-Hartman , Larry Finger , Phillip Potter , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 9/9] staging: r8188eu: support interface is always usb Message-ID: <20211006083419.ei265w5cqpctg2yf@viti.kaiser.cx> References: <20211005200821.19783-1-martin@kaiser.cx> <20211005200821.19783-9-martin@kaiser.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: Martin Kaiser Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thus wrote Michael Straube (straube.linux@gmail.com): > On 10/5/21 22:08, Martin Kaiser wrote: > > We set ODM_CMNINFO_INTERFACE to ODM_ITRF_USB as this driver supports > > only usb. Therefore, dm_odm->SupportInterface is always ODM_ITRF_USB. > > Simplify some if conditions accordingly. Remove/replace two empty > > functions. > > Signed-off-by: Martin Kaiser > > --- > > drivers/staging/r8188eu/hal/odm_HWConfig.c | 58 +++++++--------------- > > 1 file changed, 19 insertions(+), 39 deletions(-) > <...> > > static s32 odm_SignalScaleMapping(struct odm_dm_struct *dm_odm, s32 CurrSig) > > { > > - if ((dm_odm->SupportPlatform == ODM_MP) && > > - (dm_odm->SupportInterface != ODM_ITRF_PCIE) && /* USB & SDIO */ > > - (dm_odm->PatchID == 10)) > > - return odm_sig_patch_netcore(dm_odm, CurrSig); > > - else if ((dm_odm->SupportPlatform == ODM_MP) && > > - (dm_odm->SupportInterface == ODM_ITRF_PCIE) && > > - (dm_odm->PatchID == 19)) > > - return odm_sig_patch_lenove(dm_odm, CurrSig); > > + if ((dm_odm->SupportPlatform == ODM_MP) && (dm_odm->PatchID == 10)) > > + return 0; > > else > > return odm_SignalScaleMapping_92CSeries(dm_odm, CurrSig); > > } > dm_odm->SupportPlatform is always ODM_CE, so this could be just: > return odm_SignalScaleMapping_92CSeries(dm_odm, CurrSig); > And then it's just an unnecessary wrapper. ;) I see. I'll send more patches to clean up this area as time permits. Thanks, Martin