Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp5002142pxb; Tue, 5 Oct 2021 15:17:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzmzlNNXVnD+JneCybEr3BiJDIu+y4QVwa4TuRzLLZaH6nYHTLvRcF0Ib4c8bS7DXBS1qr X-Received: by 2002:a17:90a:9f91:: with SMTP id o17mr6686541pjp.225.1633472279334; Tue, 05 Oct 2021 15:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633472279; cv=none; d=google.com; s=arc-20160816; b=kAiOzC/ddRC+TFppCilfOt5aCANHNC0Z1Vq0mWd0NU3vwC6DAbS3sMXjTvZkdwuwTg HVL0AS0cF+DTNutvOvC/I2faMM7Skkvp/sGiTosaajfPuM7MPteG3PzxXJwGM4nDmkOn /iEVoddJtQHsth2JBfJFbNI5IWaNjNHiZRiGpHmH264ZFprBBrzelXrkKpQwZvuDd6WK zq8CtoPp7AOb7+0zsvyJIDrCWpnaFdhQRRiX3zzxEAunJ6KpAECQwwFznhqI5x/9Ms3+ 8JNl88tyRH0xwTUa/tLVNeZjvvblBqMG+8tmlE+7CO4EBdrG6tLXKEIt8dnLQABmaCFv h7/w== 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=qxs6a/YOJlcXbFGJuLKjfSBLL26lfGvubpNFpg4B2uw=; b=KMGUs9XqPecM6W+vUwkNjljvIjPK38xAEfu4t5PabncAwzvq2g6HmpPmyxY/XG75fI et+mm4eAVf3Z+xSPb8EGGpDDJablgaK6WvQqBjlgwHsmalGDk7ioxcsRExILBLLgHhgu OnJmtDcVHriIxxkkRvl6jY5ovPxI6fRoQbQws0zNLzUo8DDHe23ypK1xEW5fU+MCPHHp V7jqheXY+XGc4JR+LnOwynl4ncZK/7b0cALSwXoXHvDWWvZLzZjD1W4+8D67jwrOL8TZ py18qiX/g7Rt8FKaHAFn4qemaf5uuNO6BLfOIT3Fx3CttiID4WEsOr6B/9Oqy/vjqbUu ICBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FBy3dmrQ; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q194si1914197pgq.66.2021.10.05.15.17.42; Tue, 05 Oct 2021 15:17:59 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FBy3dmrQ; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236700AbhJEWSs (ORCPT + 99 others); Tue, 5 Oct 2021 18:18:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236711AbhJEWSp (ORCPT ); Tue, 5 Oct 2021 18:18:45 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F081AC061753 for ; Tue, 5 Oct 2021 15:16:52 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id r10so2349154wra.12 for ; Tue, 05 Oct 2021 15:16:52 -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=qxs6a/YOJlcXbFGJuLKjfSBLL26lfGvubpNFpg4B2uw=; b=FBy3dmrQ48JXwNkdxo1l405ZzKldehno8kEVoWUSik5BAsMNmcxPElYUXJXXHfuad2 dIwJ7XDUfmWyfhryi1uXf+nSdr795+xnpPXmSvzOEcDcfWuoSu8auJmllKW8nDdjrCU9 Hz13Xv27UA4cWQizmo1n/TBozZ1oVX+4g8m8nKP2i4rld9nem7kmxKwj0ruwyJlYMNRv oq774EVvSliscTF7q6k/FpWr21EVUKxi7GLTWgzX7hO7R61SY7hdtAO5Ye159nB9KSKa SXIl51vZAHhxQz4LxuDWsAaRSgAQxWD22zUA5IOjBtfJrBysCJSZ7P2lCvA4OkYHEpgL qBjw== 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=qxs6a/YOJlcXbFGJuLKjfSBLL26lfGvubpNFpg4B2uw=; b=Hx3oW08v4HP/OopZxE7NqsHIlIM/dOTL5JOvzJbqXEe5sUQ+DL4pa3mgMQnKoaAaw0 YSw+EgYHm7LFqh5sO10eCVH1T5QoWTm+ugee8HXq8Hlcx1UEwkYlc2Zp+1vyYPjXvmoI AJTWfeysdAfZp2cetyy40XbbqvsU+ZltjC8wlXD0E/fFrjYZcQGSHi8OBdB3T//unDdz lSgzUc8kFS4mAx809tTt1UMdobopmhOUr66fuXhpPFaNiUQHALzMFy8ry1XfZHPHub71 egeD57XrNPpPcnY6bXRXFLKtFTmoj8hpHmTfgudu2ip2BpSiI0c8W0UFezugxQSswXa9 dBwQ== X-Gm-Message-State: AOAM533Aahhzh2e9hQ06J1c7Jc2JFZlxeL/WC5o19bhCvS0yDt90Jpry mCtM5qtRCMi9KStOYnwt+1A= X-Received: by 2002:a7b:cc88:: with SMTP id p8mr6215089wma.101.1633472211575; Tue, 05 Oct 2021 15:16:51 -0700 (PDT) Received: from ?IPV6:2a02:8108:96c0:3b88::f816? ([2a02:8108:96c0:3b88::f816]) by smtp.gmail.com with ESMTPSA id j6sm5271416wrh.76.2021.10.05.15.16.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Oct 2021 15:16:51 -0700 (PDT) Message-ID: Date: Wed, 6 Oct 2021 00:16:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.1 Subject: Re: [PATCH 9/9] staging: r8188eu: support interface is always usb Content-Language: en-US To: Martin Kaiser , Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org References: <20211005200821.19783-1-martin@kaiser.cx> <20211005200821.19783-9-martin@kaiser.cx> From: Michael Straube In-Reply-To: <20211005200821.19783-9-martin@kaiser.cx> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. ;) Regards, Michael