All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: Jaehoon Chung <jh80.chung@samsung.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH] dfu: add CONFIG_DFU_NAME_MAX_SIZE configuration
Date: Mon, 20 Jun 2022 13:23:31 +0200	[thread overview]
Message-ID: <20220620132331.167e2c9a@wsk> (raw)
In-Reply-To: <20220620111354.448512-1-jh80.chung@samsung.com>

[-- Attachment #1: Type: text/plain, Size: 1884 bytes --]

Hi Jaehoon,

> Add CONFIG_DFU_NAME_MAX_SIZE to change the proper size.
> If name is longer than default size, it can do wrong behavior during
> updating image. So it need to change the proper maximum size.
> 
> This patch is proviced the solution to change value with
> configuration.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
>  drivers/dfu/Kconfig | 9 +++++++++
>  include/dfu.h       | 2 +-
>  2 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/dfu/Kconfig b/drivers/dfu/Kconfig
> index 8d7f13dcb0b5..a181f0b8d7ba 100644
> --- a/drivers/dfu/Kconfig
> +++ b/drivers/dfu/Kconfig
> @@ -111,5 +111,14 @@ config SYS_DFU_MAX_FILE_SIZE
>  	  the buffer once we've been given the whole file.  Define
>  	  this to the maximum filesize (in bytes) for the buffer.
>  	  If undefined it defaults to the
> CONFIG_SYS_DFU_DATA_BUF_SIZE. +
> +config DFU_NAME_MAX_SIZE
> +	int "Size of the name to be added in dfu entity"
> +	default 32
> +	depends on DFU
> +	help
> +	  This value is used to maximum size. If name is longer than
> default size,
> +	  we need to change the proper maximum size.
> +
>  endif
>  endmenu
> diff --git a/include/dfu.h b/include/dfu.h
> index dcb9cd9d799a..948596f367d9 100644
> --- a/include/dfu.h
> +++ b/include/dfu.h
> @@ -99,7 +99,7 @@ struct virt_internal_data {
>  	int dev_num;
>  };
>  
> -#define DFU_NAME_SIZE			32
> +#define DFU_NAME_SIZE			CONFIG_DFU_NAME_MAX_SIZE
>  #ifndef DFU_DEFAULT_POLL_TIMEOUT
>  #define DFU_DEFAULT_POLL_TIMEOUT 0
>  #endif

Reviewed-by: Lukasz Majewski <lukma@denx.de>


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-06-20 11:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220620111357epcas1p103474818319b5dc45260e043b4ffe3cc@epcas1p1.samsung.com>
2022-06-20 11:13 ` [PATCH] dfu: add CONFIG_DFU_NAME_MAX_SIZE configuration Jaehoon Chung
2022-06-20 11:23   ` Lukasz Majewski [this message]
2023-10-31 14:47   ` Mattijs Korpershoek
2023-10-31 14:50   ` Mattijs Korpershoek
2023-11-02  9:15     ` Mattijs Korpershoek
2023-11-03  1:07       ` Jaehoon Chung
2023-11-03  5:49         ` Jaehoon Chung
2023-11-07  9:08           ` Mattijs Korpershoek
2023-11-03  9:43         ` Mattijs Korpershoek

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=20220620132331.167e2c9a@wsk \
    --to=lukma@denx.de \
    --cc=jh80.chung@samsung.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.