-
Notifications
You must be signed in to change notification settings - Fork 54.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code cleanup #596
Code cleanup #596
Conversation
Hi @PierceGriffiths! Thanks for your contribution to the Linux kernel! Linux kernel development happens on mailing lists, rather than on GitHub - this GitHub repository is a read-only mirror that isn't used for accepting contributions. So that your change can become part of Linux, please email it to us as a patch. Sending patches isn't quite as simple as sending a pull request, but fortunately it is a well documented process. Here's what to do:
How do I format my contribution?The Linux kernel community is notoriously picky about how contributions are formatted and sent. Fortunately, they have documented their expectations. Firstly, all contributions need to be formatted as patches. A patch is a plain text document showing the change you want to make to the code, and documenting why it is a good idea. You can create patches with Secondly, patches need 'commit messages', which is the human-friendly documentation explaining what the change is and why it's necessary. Thirdly, changes have some technical requirements. There is a Linux kernel coding style, and there are licensing requirements you need to comply with. Both of these are documented in the Submitting Patches documentation that is part of the kernel. Note that you will almost certainly have to modify your existing git commits to satisfy these requirements. Don't worry: there are many guides on the internet for doing this. Who do I send my contribution to?The Linux kernel is composed of a number of subsystems. These subsystems are maintained by different people, and have different mailing lists where they discuss proposed changes. If you don't already know what subsystem your change belongs to, the
Make sure that your list of recipients includes a mailing list. If you can't find a more specific mailing list, then LKML - the Linux Kernel Mailing List - is the place to send your patches. It's not usually necessary to subscribe to the mailing list before you send the patches, but if you're interested in kernel development, subscribing to a subsystem mailing list is a good idea. (At this point, you probably don't need to subscribe to LKML - it is a very high traffic list with about a thousand messages per day, which is often not useful for beginners.) How do I send my contribution?Use For more information about using How do I get help if I'm stuck?Firstly, don't get discouraged! There are an enormous number of resources on the internet, and many kernel developers who would like to see you succeed. Many issues - especially about how to use certain tools - can be resolved by using your favourite internet search engine. If you can't find an answer, there are a few places you can turn:
If you get really, really stuck, you could try the owners of this bot, @daxtens and @ajdlinux. Please be aware that we do have full-time jobs, so we are almost certainly the slowest way to get answers! I sent my patch - now what?You wait. You can check that your email has been received by checking the mailing list archives for the mailing list you sent your patch to. Messages may not be received instantly, so be patient. Kernel developers are generally very busy people, so it may take a few weeks before your patch is looked at. Then, you keep waiting. Three things may happen:
Further information
Happy hacking! This message was posted by a bot - if you have any questions or suggestions, please talk to my owners, @ajdlinux and @daxtens, or raise an issue at https://github.com/ajdlinux/KernelPRBot. |
Cleaned up previous changes to loops for readability
Reverted unnecessary loop changes and added bool casts to previously modified function returns
Reverted unnecessary replacement of for(;;) with while(1)
Reverted unnecessary changes made to loops Consolidated an if ... else into an equivalent return statement
Made adjustments necessary for patch to meet code style requirements
When a tail call fails, it is documented that the tail call should continue execution at the following instruction. An example tail call sequence is: 12: (85) call bpf_tail_call#12 13: (b7) r0 = 0 14: (95) exit The ARM assembler for the tail call in this case ends up branching to instruction 14 instead of instruction 13, resulting in the BPF filter returning a non-zero value: 178: ldr r8, [sp, torvalds#588] ; insn 12 17c: ldr r6, [r8, r6] 180: ldr r8, [sp, torvalds#580] 184: cmp r8, r6 188: bcs 0x1e8 18c: ldr r6, [sp, torvalds#524] 190: ldr r7, [sp, torvalds#528] 194: cmp r7, #0 198: cmpeq r6, torvalds#32 19c: bhi 0x1e8 1a0: adds r6, r6, #1 1a4: adc r7, r7, #0 1a8: str r6, [sp, torvalds#524] 1ac: str r7, [sp, torvalds#528] 1b0: mov r6, torvalds#104 1b4: ldr r8, [sp, torvalds#588] 1b8: add r6, r8, r6 1bc: ldr r8, [sp, torvalds#580] 1c0: lsl r7, r8, #2 1c4: ldr r6, [r6, r7] 1c8: cmp r6, #0 1cc: beq 0x1e8 1d0: mov r8, torvalds#32 1d4: ldr r6, [r6, r8] 1d8: add r6, r6, torvalds#44 1dc: bx r6 1e0: mov r0, #0 ; insn 13 1e4: mov r1, #0 1e8: add sp, sp, torvalds#596 ; insn 14 1ec: pop {r4, r5, r6, r7, r8, sl, pc} For other sequences, the tail call could end up branching midway through the following BPF instructions, or maybe off the end of the function, leading to unknown behaviours. Fixes: 39c13c2 ("arm: eBPF JIT compiler") Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" torvalds#307: FILE: ./include/rtw_mlme_ext.h:307: + char* str; ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" torvalds#313: FILE: ./include/rtw_mlme_ext.h:313: + char* str; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" torvalds#592: FILE: ./include/rtw_mlme_ext.h:592: +int WMM_param_handler(struct adapter *padapter, struct ndis_80211_var_ie * pIE); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" torvalds#595: FILE: ./include/rtw_mlme_ext.h:595: +void HT_caps_handler(struct adapter *padapter, struct ndis_80211_var_ie * pIE); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" torvalds#596: FILE: ./include/rtw_mlme_ext.h:596: +void HT_info_handler(struct adapter *padapter, struct ndis_80211_var_ie * pIE); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" torvalds#599: FILE: ./include/rtw_mlme_ext.h:599: +void ERP_IE_handler(struct adapter *padapter, struct ndis_80211_var_ie * pIE); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" torvalds#606: FILE: ./include/rtw_mlme_ext.h:606: +void update_capinfo(struct adapter * Adapter, u16 updateCap); ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" torvalds#633: FILE: ./include/rtw_mlme_ext.h:633: +void report_del_sta_event(struct adapter *padapter, unsigned char* MacAddr, unsigned short reason); ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" torvalds#634: FILE: ./include/rtw_mlme_ext.h:634: +void report_add_sta_event(struct adapter *padapter, unsigned char* MacAddr, int cam_idx); Signed-off-by: Marco Cesati <marcocesati@gmail.com>
This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" torvalds#307: FILE: ./include/rtw_mlme_ext.h:307: + char* str; ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" torvalds#313: FILE: ./include/rtw_mlme_ext.h:313: + char* str; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" torvalds#592: FILE: ./include/rtw_mlme_ext.h:592: +int WMM_param_handler(struct adapter *padapter, struct ndis_80211_var_ie * pIE); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" torvalds#595: FILE: ./include/rtw_mlme_ext.h:595: +void HT_caps_handler(struct adapter *padapter, struct ndis_80211_var_ie * pIE); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" torvalds#596: FILE: ./include/rtw_mlme_ext.h:596: +void HT_info_handler(struct adapter *padapter, struct ndis_80211_var_ie * pIE); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" torvalds#599: FILE: ./include/rtw_mlme_ext.h:599: +void ERP_IE_handler(struct adapter *padapter, struct ndis_80211_var_ie * pIE); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" torvalds#606: FILE: ./include/rtw_mlme_ext.h:606: +void update_capinfo(struct adapter * Adapter, u16 updateCap); ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" torvalds#633: FILE: ./include/rtw_mlme_ext.h:633: +void report_del_sta_event(struct adapter *padapter, unsigned char* MacAddr, unsigned short reason); ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" torvalds#634: FILE: ./include/rtw_mlme_ext.h:634: +void report_add_sta_event(struct adapter *padapter, unsigned char* MacAddr, int cam_idx); Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Marco Cesati <marcocesati@gmail.com> Link: https://lore.kernel.org/r/20210315170618.2566-54-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
`vsprintf`: avoid `#ifdef` in `.c` file
Merge more stables
I did my best to clean up bits and pieces of the kernel code.