HomeFreeBSD

Quiesce a couple pages of clang warnings with a cast. Duplicates

Description

Quiesce a couple pages of clang warnings with a cast. Duplicates
linux maintainer commit:

https://github.com/torvalds/linux/commit/627871b71c89a6ec12fbed75063f238e0c7127b2#diff-8c6ddb4c3ad69a6fb9f289475821db56

ar9300template_aphrodite.h:575:40: warning: implicit conversion from 'int'

to 'u_int8_t' (aka 'unsigned char') changes value from 3495 to 167
[-Wconstant-conversion]
          /* Data[8].ctl_edges[7].bChannel*/FREQ2FBIN(5795, 0)}
                                            ^~~~~~~~~~~~~~~~~~

ar9300eep.h:142:41: note: expanded from macro 'FREQ2FBIN'

(((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))

Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D15476

Details

Provenance
sbrunoAuthored on
Reviewer
imp
Differential Revision
D15476: Quiesce build errors with cast to u_int8_t
Parents
rS333800: muge(4): style and comment cleanup
Branches
Unknown
Tags
Unknown