* [PATCH 1/3] staging/rtl8712: remove extra blank lines; fix code alignment
@ 2020-10-20 18:24 Elena Afanasova
2020-10-20 18:24 ` [PATCH 2/3] staging/rtl8712: fix code style for comparison to NULL Elena Afanasova
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Elena Afanasova @ 2020-10-20 18:24 UTC (permalink / raw)
To: gregkh; +Cc: devel, outreachy-kernel, Elena Afanasova
Reported by checkpatch.pl
Signed-off-by: Elena Afanasova <eafanasova@gmail.com>
---
drivers/staging/rtl8712/rtl871x_recv.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8712/rtl871x_recv.h b/drivers/staging/rtl8712/rtl871x_recv.h
index e83c256e1474..57a965b9839b 100644
--- a/drivers/staging/rtl8712/rtl871x_recv.h
+++ b/drivers/staging/rtl8712/rtl871x_recv.h
@@ -29,7 +29,6 @@ struct stainfo_rxcache {
#define PHY_RSSI_SLID_WIN_MAX 100
#define PHY_LINKQUALITY_SLID_WIN_MAX 20
-
struct smooth_rssi_data {
u32 elements[100]; /* array to store values */
u32 index; /* index to current array to store */
@@ -38,7 +37,6 @@ struct smooth_rssi_data {
};
struct rx_pkt_attrib {
-
u8 amsdu;
u8 order;
u8 qos;
@@ -129,7 +127,7 @@ union recv_frame *r8712_alloc_recvframe(struct __queue *pfree_recv_queue);
void r8712_free_recvframe(union recv_frame *precvframe,
struct __queue *pfree_recv_queue);
void r8712_free_recvframe_queue(struct __queue *pframequeue,
- struct __queue *pfree_recv_queue);
+ struct __queue *pfree_recv_queue);
int r8712_wlanhdr_to_ethhdr(union recv_frame *precvframe);
int recv_func(struct _adapter *padapter, void *pcontext);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/3] staging/rtl8712: fix code style for comparison to NULL
2020-10-20 18:24 [PATCH 1/3] staging/rtl8712: remove extra blank lines; fix code alignment Elena Afanasova
@ 2020-10-20 18:24 ` Elena Afanasova
2020-10-20 18:24 ` [PATCH 3/3] staging/rtl8712: use BIT macro Elena Afanasova
2020-10-21 4:28 ` [Outreachy kernel] [PATCH 1/3] staging/rtl8712: remove extra blank lines; fix code alignment Vaishali Thakkar
2 siblings, 0 replies; 6+ messages in thread
From: Elena Afanasova @ 2020-10-20 18:24 UTC (permalink / raw)
To: gregkh; +Cc: devel, outreachy-kernel, Elena Afanasova
Reported by checkpatch.pl
Signed-off-by: Elena Afanasova <eafanasova@gmail.com>
---
drivers/staging/rtl8712/rtl871x_recv.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8712/rtl871x_recv.h b/drivers/staging/rtl8712/rtl871x_recv.h
index 57a965b9839b..d03859ca1697 100644
--- a/drivers/staging/rtl8712/rtl871x_recv.h
+++ b/drivers/staging/rtl8712/rtl871x_recv.h
@@ -134,7 +134,7 @@ int recv_func(struct _adapter *padapter, void *pcontext);
static inline u8 *get_rxmem(union recv_frame *precvframe)
{
/* always return rx_head... */
- if (precvframe == NULL)
+ if (!precvframe)
return NULL;
return precvframe->u.hdr.rx_head;
}
@@ -142,7 +142,7 @@ static inline u8 *get_rxmem(union recv_frame *precvframe)
static inline u8 *get_recvframe_data(union recv_frame *precvframe)
{
/* always return rx_data */
- if (precvframe == NULL)
+ if (!precvframe)
return NULL;
return precvframe->u.hdr.rx_data;
}
@@ -152,7 +152,7 @@ static inline u8 *recvframe_pull(union recv_frame *precvframe, sint sz)
/* used for extract sz bytes from rx_data, update rx_data and return
* the updated rx_data to the caller
*/
- if (precvframe == NULL)
+ if (!precvframe)
return NULL;
precvframe->u.hdr.rx_data += sz;
if (precvframe->u.hdr.rx_data > precvframe->u.hdr.rx_tail) {
@@ -169,7 +169,7 @@ static inline u8 *recvframe_put(union recv_frame *precvframe, sint sz)
* return the updated rx_tail to the caller
* after putting, rx_tail must be still larger than rx_end.
*/
- if (precvframe == NULL)
+ if (!precvframe)
return NULL;
precvframe->u.hdr.rx_tail += sz;
if (precvframe->u.hdr.rx_tail > precvframe->u.hdr.rx_end) {
@@ -187,7 +187,7 @@ static inline u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz)
* updated rx_end to the caller
* after pulling, rx_end must be still larger than rx_data.
*/
- if (precvframe == NULL)
+ if (!precvframe)
return NULL;
precvframe->u.hdr.rx_tail -= sz;
if (precvframe->u.hdr.rx_tail < precvframe->u.hdr.rx_data) {
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/3] staging/rtl8712: use BIT macro
2020-10-20 18:24 [PATCH 1/3] staging/rtl8712: remove extra blank lines; fix code alignment Elena Afanasova
2020-10-20 18:24 ` [PATCH 2/3] staging/rtl8712: fix code style for comparison to NULL Elena Afanasova
@ 2020-10-20 18:24 ` Elena Afanasova
2020-10-20 18:44 ` [Outreachy kernel] " Matthew Wilcox
2020-10-21 4:28 ` [Outreachy kernel] [PATCH 1/3] staging/rtl8712: remove extra blank lines; fix code alignment Vaishali Thakkar
2 siblings, 1 reply; 6+ messages in thread
From: Elena Afanasova @ 2020-10-20 18:24 UTC (permalink / raw)
To: gregkh; +Cc: devel, outreachy-kernel, Elena Afanasova
Reported by checkpatch.pl
Signed-off-by: Elena Afanasova <eafanasova@gmail.com>
---
drivers/staging/rtl8712/rtl871x_recv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8712/rtl871x_recv.h b/drivers/staging/rtl8712/rtl871x_recv.h
index d03859ca1697..2ed2d3edb312 100644
--- a/drivers/staging/rtl8712/rtl871x_recv.h
+++ b/drivers/staging/rtl8712/rtl871x_recv.h
@@ -8,7 +8,7 @@
#define NR_RECVFRAME 256
#define RXFRAME_ALIGN 8
-#define RXFRAME_ALIGN_SZ (1 << RXFRAME_ALIGN)
+#define RXFRAME_ALIGN_SZ BIT(RXFRAME_ALIGN)
#define MAX_SUBFRAME_COUNT 64
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/3] staging/rtl8712: use BIT macro
2020-10-20 18:24 ` [PATCH 3/3] staging/rtl8712: use BIT macro Elena Afanasova
@ 2020-10-20 18:44 ` Matthew Wilcox
2020-10-27 12:44 ` Dan Carpenter
0 siblings, 1 reply; 6+ messages in thread
From: Matthew Wilcox @ 2020-10-20 18:44 UTC (permalink / raw)
To: Elena Afanasova; +Cc: gregkh, devel, outreachy-kernel
On Tue, Oct 20, 2020 at 11:24:39AM -0700, Elena Afanasova wrote:
> Reported by checkpatch.pl
Checkpatch is wrong.
> +++ b/drivers/staging/rtl8712/rtl871x_recv.h
> @@ -8,7 +8,7 @@
> #define NR_RECVFRAME 256
>
> #define RXFRAME_ALIGN 8
> -#define RXFRAME_ALIGN_SZ (1 << RXFRAME_ALIGN)
> +#define RXFRAME_ALIGN_SZ BIT(RXFRAME_ALIGN)
>
> #define MAX_SUBFRAME_COUNT 64
>
> --
> 2.25.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20201020182439.43314-3-eafanasova%40gmail.com.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/3] staging/rtl8712: use BIT macro
2020-10-20 18:44 ` [Outreachy kernel] " Matthew Wilcox
@ 2020-10-27 12:44 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2020-10-27 12:44 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: Elena Afanasova, devel, gregkh, outreachy-kernel
On Tue, Oct 20, 2020 at 07:44:04PM +0100, Matthew Wilcox wrote:
> On Tue, Oct 20, 2020 at 11:24:39AM -0700, Elena Afanasova wrote:
> > Reported by checkpatch.pl
>
> Checkpatch is wrong.
>
> > +++ b/drivers/staging/rtl8712/rtl871x_recv.h
> > @@ -8,7 +8,7 @@
> > #define NR_RECVFRAME 256
> >
> > #define RXFRAME_ALIGN 8
> > -#define RXFRAME_ALIGN_SZ (1 << RXFRAME_ALIGN)
> > +#define RXFRAME_ALIGN_SZ BIT(RXFRAME_ALIGN)
Yeah. It's weird to talk about size as a BIT() flag. The RXFRAME_ALIGN
is not needed. Just say:
-#define RXFRAME_ALIGN 8
-#define RXFRAME_ALIGN_SZ (1 << RXFRAME_ALIGN)
+#define RXFRAME_ALIGN_SZ 256
This is literally used for aligning the RX frame. It seems like a crazy
thing to me that to aligned at 256 bytes. I would have expected 64 bit
alignment or page alignment but not 256 byte alignment... Weird.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH 1/3] staging/rtl8712: remove extra blank lines; fix code alignment
2020-10-20 18:24 [PATCH 1/3] staging/rtl8712: remove extra blank lines; fix code alignment Elena Afanasova
2020-10-20 18:24 ` [PATCH 2/3] staging/rtl8712: fix code style for comparison to NULL Elena Afanasova
2020-10-20 18:24 ` [PATCH 3/3] staging/rtl8712: use BIT macro Elena Afanasova
@ 2020-10-21 4:28 ` Vaishali Thakkar
2 siblings, 0 replies; 6+ messages in thread
From: Vaishali Thakkar @ 2020-10-21 4:28 UTC (permalink / raw)
To: Elena Afanasova; +Cc: Greg KH, devel, Outreachy
On Wed, Oct 21, 2020 at 12:01 AM Elena Afanasova <eafanasova@gmail.com> wrote:
>
> Reported by checkpatch.pl
>
> Signed-off-by: Elena Afanasova <eafanasova@gmail.com>
This patch is fixing 2 different checkpatch warnings. They
should be sent as separate patches. One for removing extra
blank lines, another one for fixing the code alignment.
> ---
> drivers/staging/rtl8712/rtl871x_recv.h | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/staging/rtl8712/rtl871x_recv.h b/drivers/staging/rtl8712/rtl871x_recv.h
> index e83c256e1474..57a965b9839b 100644
> --- a/drivers/staging/rtl8712/rtl871x_recv.h
> +++ b/drivers/staging/rtl8712/rtl871x_recv.h
> @@ -29,7 +29,6 @@ struct stainfo_rxcache {
> #define PHY_RSSI_SLID_WIN_MAX 100
> #define PHY_LINKQUALITY_SLID_WIN_MAX 20
>
> -
> struct smooth_rssi_data {
> u32 elements[100]; /* array to store values */
> u32 index; /* index to current array to store */
> @@ -38,7 +37,6 @@ struct smooth_rssi_data {
> };
>
> struct rx_pkt_attrib {
> -
> u8 amsdu;
> u8 order;
> u8 qos;
> @@ -129,7 +127,7 @@ union recv_frame *r8712_alloc_recvframe(struct __queue *pfree_recv_queue);
> void r8712_free_recvframe(union recv_frame *precvframe,
> struct __queue *pfree_recv_queue);
> void r8712_free_recvframe_queue(struct __queue *pframequeue,
> - struct __queue *pfree_recv_queue);
> + struct __queue *pfree_recv_queue);
> int r8712_wlanhdr_to_ethhdr(union recv_frame *precvframe);
> int recv_func(struct _adapter *padapter, void *pcontext);
>
> --
> 2.25.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20201020182439.43314-1-eafanasova%40gmail.com.
--
Vaishali
--
Vaishali
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-27 12:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-20 18:24 [PATCH 1/3] staging/rtl8712: remove extra blank lines; fix code alignment Elena Afanasova
2020-10-20 18:24 ` [PATCH 2/3] staging/rtl8712: fix code style for comparison to NULL Elena Afanasova
2020-10-20 18:24 ` [PATCH 3/3] staging/rtl8712: use BIT macro Elena Afanasova
2020-10-20 18:44 ` [Outreachy kernel] " Matthew Wilcox
2020-10-27 12:44 ` Dan Carpenter
2020-10-21 4:28 ` [Outreachy kernel] [PATCH 1/3] staging/rtl8712: remove extra blank lines; fix code alignment Vaishali Thakkar
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.