lkml.org 
[lkml]   [2021]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] net: 6pack: Fix tx timeout and slot time
From
From: Guenter Roeck <linux@roeck-us.net>
Date: Wed, 8 Sep 2021 20:57:43 -0700

> tx timeout and slot time are currently specified in units of HZ.
> On Alpha, HZ is defined as 1024. When building alpha:allmodconfig,
> this results in the following error message.
>
> drivers/net/hamradio/6pack.c: In function 'sixpack_open':
> drivers/net/hamradio/6pack.c:71:41: error:
> unsigned conversion from 'int' to 'unsigned char'
> changes value from '256' to '0'
>
> In the 6PACK protocol, tx timeout is specified in units of 10 ms
> and transmitted over the wire. Defining a value dependent on HZ
> doesn't really make sense. Assume that the intent was to set tx
> timeout and slot time based on a HZ value of 100 and use constants
> instead of values depending on HZ for SIXP_TXDELAY and SIXP_SLOTTIME.
>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> No idea if this is correct or even makes sense. Compile tested only.

These are timer offsets so they have to me HZ based. Better to make the
structure members unsigned long, I think.

Thanks.

\
 
 \ /
  Last update: 2021-09-09 13:36    [W:0.107 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site