mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Straube <straube.linux@gmail.com>
To: Martin Kaiser <martin@kaiser.cx>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 9/9] staging: r8188eu: support interface is always usb
Date: Wed, 6 Oct 2021 00:16:50 +0200	[thread overview]
Message-ID: <dd53513b-00c1-e915-712b-08b7cb7b5b34@gmail.com> (raw)
In-Reply-To: <20211005200821.19783-9-martin@kaiser.cx>

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 <martin@kaiser.cx>
> ---
>   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

  reply	other threads:[~2021-10-05 22:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05 20:08 [PATCH 1/9] staging: r8188eu: remove an obsolete comment Martin Kaiser
2021-10-05 20:08 ` [PATCH 2/9] staging: r8188eu: remove unused led component Martin Kaiser
2021-10-05 22:05   ` Michael Straube
2021-10-05 20:08 ` [PATCH 3/9] staging: r8188eu: remove write-only HwRxPageSize Martin Kaiser
2021-10-05 22:06   ` Michael Straube
2021-10-05 20:08 ` [PATCH 4/9] staging: r8188eu: remove unused IntrMask Martin Kaiser
2021-10-05 22:06   ` Michael Straube
2021-10-05 20:08 ` [PATCH 5/9] staging: r8188eu: remove two write-only hal components Martin Kaiser
2021-10-05 22:06   ` Michael Straube
2021-10-05 20:08 ` [PATCH 6/9] staging: r8188eu: HardwareType is write-only Martin Kaiser
2021-10-05 22:06   ` Michael Straube
2021-10-05 20:08 ` [PATCH 7/9] staging: r8188eu: chip_type " Martin Kaiser
2021-10-05 22:07   ` Michael Straube
2021-10-05 20:08 ` [PATCH 8/9] staging: r8188eu: interface type is always usb Martin Kaiser
2021-10-05 22:07   ` Michael Straube
2021-10-05 20:08 ` [PATCH 9/9] staging: r8188eu: support interface " Martin Kaiser
2021-10-05 22:16   ` Michael Straube [this message]
2021-10-06  8:34     ` Martin Kaiser
2021-10-05 22:04 ` [PATCH 1/9] staging: r8188eu: remove an obsolete comment Michael Straube

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dd53513b-00c1-e915-712b-08b7cb7b5b34@gmail.com \
    --to=straube.linux@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=martin@kaiser.cx \
    --cc=phil@philpotter.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome