public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Martin Kaiser <martin@kaiser.cx>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	Michael Straube <straube.linux@gmail.com>,
	Pavel Skripkin <paskripkin@gmail.com>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 05/14] staging: r8188eu: use a local buffer for efuse data
Date: Tue, 12 Jul 2022 15:25:08 +0300	[thread overview]
Message-ID: <20220712122507.GN2338@kadam> (raw)
In-Reply-To: <20220709171000.180481-6-martin@kaiser.cx>

On Sat, Jul 09, 2022 at 07:09:51PM +0200, Martin Kaiser wrote:
> The efuse_eeprom_data array in struct eeprom_priv is used only by
> ReadAdapterInfo8188EU. We can remove efuse_eeprom_data and use a local
> buffer instead.
> 
> Use EFUSE_MAP_LEN_88E as buffer size. Its value is the same as
> HWSET_MAX_SIZE_512. The functions that access the buffer use
> EFUSE_MAP_LEN_88E for its size.
> 
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
>  drivers/staging/r8188eu/hal/usb_halinit.c    | 23 ++++++++++----------
>  drivers/staging/r8188eu/include/rtw_eeprom.h |  3 ---
>  2 files changed, 12 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
> index 18c2817bf1e3..807d8ce8cbfc 100644
> --- a/drivers/staging/r8188eu/hal/usb_halinit.c
> +++ b/drivers/staging/r8188eu/hal/usb_halinit.c
> @@ -929,6 +929,7 @@ void ReadAdapterInfo8188EU(struct adapter *Adapter)
>  {
>  	struct eeprom_priv *eeprom = &Adapter->eeprompriv;
>  	struct led_priv *ledpriv = &Adapter->ledpriv;
> +	u8 efuse_buf[EFUSE_MAP_LEN_88E] __aligned(4);

This is 512 bytes.  We used to be slightly worried about declaring 512
bytes on the stack, but I'm not sure the situation now.

regards,
dan carpenter


  reply	other threads:[~2022-07-12 12:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-09 17:09 [PATCH 00/14] clean up efuse reading Martin Kaiser
2022-07-09 17:09 ` [PATCH 01/14] staging: r8188eu: remove unused eeprom defines Martin Kaiser
2022-07-09 17:09 ` [PATCH 02/14] staging: r8188eu: remove EepromOrEfuse from struct eeprom_priv Martin Kaiser
2022-07-09 17:09 ` [PATCH 03/14] staging: r8188eu: remove eeprom function prototypes Martin Kaiser
2022-07-09 17:09 ` [PATCH 04/14] staging: r8188eu: merge EFUSE_ShadowMapUpdate with its caller Martin Kaiser
2022-07-09 17:09 ` [PATCH 05/14] staging: r8188eu: use a local buffer for efuse data Martin Kaiser
2022-07-12 12:25   ` Dan Carpenter [this message]
2022-07-12 13:45     ` Larry Finger
2022-07-09 17:09 ` [PATCH 06/14] staging: r8188eu: always initialise efuse buffer with 0xff Martin Kaiser
2022-07-09 17:09 ` [PATCH 07/14] staging: r8188eu: use memcpy for fallback mac address Martin Kaiser
2022-07-12 16:28   ` Joe Perches
2022-07-09 17:09 ` [PATCH 08/14] staging: r8188eu: merge ReadEFuseByIC into rtl8188e_ReadEFuse Martin Kaiser
2022-07-09 17:09 ` [PATCH 09/14] staging: r8188eu: txpktbuf_bndy is always 0 Martin Kaiser
2022-07-09 17:09 ` [PATCH 10/14] staging: r8188eu: offset is always 0 in rtl8188e_ReadEFuse Martin Kaiser
2022-07-09 17:09 ` [PATCH 11/14] staging: r8188eu: offset is always 0 in iol_read_efuse Martin Kaiser
2022-07-09 17:09 ` [PATCH 12/14] staging: r8188eu: _offset is always 0 in efuse_phymap_to_logical Martin Kaiser
2022-07-09 17:09 ` [PATCH 13/14] staging: r8188eu: efuse_utilized is never read Martin Kaiser
2022-07-09 17:10 ` [PATCH 14/14] staging: r8188eu: the bcnhead parameter is always 0 Martin Kaiser

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=20220712122507.GN2338@kadam \
    --to=dan.carpenter@oracle.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=paskripkin@gmail.com \
    --cc=phil@philpotter.co.uk \
    --cc=straube.linux@gmail.com \
    /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