diff mbox series

[2/2] net: tftp: remove TFTP_MTU_BLOCKSIZE

Message ID 20200422141755.2.I7e1980e0938cb60ddf2b7fea2778d9987291da99@changeid
State Accepted
Commit 31d275b095e2c8c5607ab0e95e8342be7071ddf6
Headers show
Series [1/2] net: tftp: Add help for CONFIG_TFTP_BLOCKSIZE | expand

Commit Message

Patrick Delaunay April 22, 2020, 12:18 p.m. UTC
Remove the unneeded define TFTP_MTU_BLOCKSIZE.
Since the KConfig migration done by commit b618b3707633 ("net:
Convert CONFIG_TFTP_BLOCKSIZE to Kconfig"), CONFIG_TFTP_BLOCKSIZE
is always defined and can be used directly to avoid confusion
(fallback to 1468 in code is never used).

Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
---

 net/tftp.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Tom Rini April 28, 2020, 1:54 p.m. UTC | #1
On Wed, Apr 22, 2020 at 02:18:26PM +0200, Patrick Delaunay wrote:

> Remove the unneeded define TFTP_MTU_BLOCKSIZE.
> Since the KConfig migration done by commit b618b3707633 ("net:
> Convert CONFIG_TFTP_BLOCKSIZE to Kconfig"), CONFIG_TFTP_BLOCKSIZE
> is always defined and can be used directly to avoid confusion
> (fallback to 1468 in code is never used).
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/net/tftp.c b/net/tftp.c
index 585eb6ef0c..be24e63075 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -133,14 +133,9 @@  static char tftp_filename[MAX_LEN];
  * almost-MTU block sizes.  At least try... fall back to 512 if need be.
  * (but those using CONFIG_IP_DEFRAG may want to set a larger block in cfg file)
  */
-#ifdef CONFIG_TFTP_BLOCKSIZE
-#define TFTP_MTU_BLOCKSIZE CONFIG_TFTP_BLOCKSIZE
-#else
-#define TFTP_MTU_BLOCKSIZE 1468
-#endif
 
 static unsigned short tftp_block_size = TFTP_BLOCK_SIZE;
-static unsigned short tftp_block_size_option = TFTP_MTU_BLOCKSIZE;
+static unsigned short tftp_block_size_option = CONFIG_TFTP_BLOCKSIZE;
 
 static inline int store_block(int block, uchar *src, unsigned int len)
 {