Message ID | 1462474003-25279-1-git-send-email-a@unstable.cc (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Marek Lindner |
Headers |
Return-Path: <b.a.t.m.a.n-bounces@lists.open-mesh.org> X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 73A7982706; Thu, 5 May 2016 20:47:19 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=unstable.cc Received-SPF: Permerror (SPF Permanent Error: Two or more type TXT spf records found.) identity=mailfrom; client-ip=5.148.176.60; helo=s2.neomailbox.net; envelope-from=a@unstable.cc; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=none header.from=unstable.cc Received: from s2.neomailbox.net (s2.neomailbox.net [5.148.176.60]) by open-mesh.org (Postfix) with ESMTPS id 3F94282702 for <b.a.t.m.a.n@lists.open-mesh.org>; Thu, 5 May 2016 20:47:16 +0200 (CEST) From: Antonio Quartulli <a@unstable.cc> To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 6 May 2016 02:46:37 +0800 Message-Id: <1462474003-25279-1-git-send-email-a@unstable.cc> Cc: Antonio Quartulli <a@unstable.cc>, mareklindner@neomailbox.ch Subject: [B.A.T.M.A.N.] [PATCH 1/7] batman-adv: remove useless inline attribute for sysfs helper function X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n.lists.open-mesh.org> List-Unsubscribe: <https://lists.open-mesh.org/mm/options/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=unsubscribe> List-Archive: <http://lists.open-mesh.org/pipermail/b.a.t.m.a.n/> List-Post: <mailto:b.a.t.m.a.n@lists.open-mesh.org> List-Help: <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=help> List-Subscribe: <https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=subscribe> Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n@lists.open-mesh.org> Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" <b.a.t.m.a.n-bounces@lists.open-mesh.org> |
Commit Message
Antonio Quartulli
May 5, 2016, 6:46 p.m. UTC
the compiler can optimize functions within the same C file and therefore
there is no need to make it explicit.
Remove the useless inline attribute for __batadv_store_uint_attr()
Signed-off-by: Antonio Quartulli <a@unstable.cc>
---
net/batman-adv/sysfs.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
Comments
On Friday 06 May 2016 02:46:37 Antonio Quartulli wrote: > the compiler can optimize functions within the same C file and therefore > there is no need to make it explicit. > > Remove the useless inline attribute for __batadv_store_uint_attr() > > Signed-off-by: Antonio Quartulli <a@unstable.cc> > --- > net/batman-adv/sysfs.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) This is not about this particular patch but for the patch series. Please check the attached test results of the daily build tests. Kind regards, Sve
On Friday, May 06, 2016 02:46:37 Antonio Quartulli wrote: > the compiler can optimize functions within the same C file and therefore > there is no need to make it explicit. > > Remove the useless inline attribute for __batadv_store_uint_attr() > > Signed-off-by: Antonio Quartulli <a@unstable.cc> > --- > net/batman-adv/sysfs.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) Applied in revision 67bf881. Thanks, Marek
On Thu, May 05, 2016 at 10:17:18PM +0200, Sven Eckelmann wrote: > On Friday 06 May 2016 02:46:37 Antonio Quartulli wrote: > > the compiler can optimize functions within the same C file and therefore > > there is no need to make it explicit. > > > > Remove the useless inline attribute for __batadv_store_uint_attr() > > > > Signed-off-by: Antonio Quartulli <a@unstable.cc> > > --- > > net/batman-adv/sysfs.c | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > > This is not about this particular patch but for the patch series. > > Please check the attached test results of the daily build tests. Sven, do you know how I can deal with: ./net/batman-adv/types.h:1338: warning: No description found for parameter 'gw' ? There are also other objects similar to that in the bat_algo_ops (i.e. iface, neigh, ..), but the check complains about gw only ? > > Kind regards, > Sve
On Friday 06 May 2016 10:34:34 Antonio Quartulli wrote: > On Thu, May 05, 2016 at 10:17:18PM +0200, Sven Eckelmann wrote: > > On Friday 06 May 2016 02:46:37 Antonio Quartulli wrote: > > > the compiler can optimize functions within the same C file and therefore > > > there is no need to make it explicit. > > > > > > Remove the useless inline attribute for __batadv_store_uint_attr() > > > > > > Signed-off-by: Antonio Quartulli <a@unstable.cc> > > > --- > > > > > > net/batman-adv/sysfs.c | 12 ++++++------ > > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > This is not about this particular patch but for the patch series. > > > > Please check the attached test results of the daily build tests. > > Sven, > > > do you know how I can deal with: > > ./net/batman-adv/types.h:1338: warning: No description found for parameter > 'gw' > > ? > > There are also other objects similar to that in the bat_algo_ops (i.e. > iface, neigh, ..), but the check complains about gw only ? Kerneldoc cannot parse these kind of substructures. Just run: scripts/kernel-doc -html net/batman-adv/types.h > test.html chromium test.html It just creates random noise from your kerneldoc input. So one way to deal with it is to create a substruct hacks parse functionality for kerneldoc or avoid these kind of anonymous-type substructs and use extra correctly typed structs. You can contact Jonathan Corbet and inform him that these kinds of things are not "correctly" parsed (and don't use dirty hacks to creat kerneldoc-sections like struct sockaddr_caif used for its union kerneldoc). Maybe with a small example. Kind regards, Sven
On Friday 06 May 2016 09:23:40 Sven Eckelmann wrote: [...] > Kerneldoc cannot parse these kind of substructures. Just run: > > scripts/kernel-doc -html net/batman-adv/types.h > test.html > chromium test.html > > It just creates random noise from your kerneldoc input. So one way to deal > with it is to create a substruct hacks parse functionality for kerneldoc or > avoid these kind of anonymous-type substructs and use extra correctly typed > structs. > > You can contact Jonathan Corbet and inform him that these kinds of things > are not "correctly" parsed (and don't use dirty hacks to creat > kerneldoc-sections like struct sockaddr_caif used for its union kerneldoc). > Maybe with a small example. From https://www.kernel.org/doc/Documentation/kernel-doc-nano-HOWTO.txt > Nesting of declarations is not supported. So you either have to add it to kernel-doc or do it differently. Kind regards, Sven
On Fri, May 06, 2016 at 09:53:26AM +0200, Sven Eckelmann wrote:
> So you either have to add it to kernel-doc or do it differently.
Thanks for checking this. I will split the structure in real substructures with
their own definition and document the fields there.
About the result from IWUY: any easy way to run it locally ? I tried to run it
by specifying the IWYU path via CC=, but I get way more noisy result that what
you reported in your previous email. I'd like to learn this so that I can easily
understand which patch requires which include.
On top of that, the results you posted says that I should include
<linux/stddef.h> in bat_v.c, but it already included in that file. no?
Cheers,
On Monday 09 May 2016 00:33:24 Antonio Quartulli wrote: > On Fri, May 06, 2016 at 09:53:26AM +0200, Sven Eckelmann wrote: > > So you either have to add it to kernel-doc or do it differently. > > Thanks for checking this. I will split the structure in real substructures > with their own definition and document the fields there. > > About the result from IWUY: any easy way to run it locally ? I tried to run > it by specifying the IWYU path via CC=, but I get way more noisy result > that what you reported in your previous email. I'd like to learn this so > that I can easily understand which patch requires which include. The actual script can be found in build_test.git [1]. But you can also download the repo, prepare the headers with generate_linux_headers.sh LINUX_REPOSITORY=/home/sven/tmp/linux-next ./generate_linux_headers.sh and then mount it mkdir linux-build sudo mount -o loop linux-build.img linux-build Now you can for example run the build tests and receive the mail: REMOTE=/home/sven/tmp/qemu-batman/batman-adv TO=sven ./checkstuff.sh Or you can extract the relevant part of the script (see attachment - file paths have to be adjusted; build_test.git with prepared headers is still required) and run it manually. Please make sure that you've committed your changed before running it because it will remove your local changes. sh ~/tmp/testheaders.sh If you wonder why a header was added then you should have a look at the "test" file which includes the "noisy" part which you've mentioned. You should at least use iwyu 3.5 > On top of that, the results you posted says that I should include > <linux/stddef.h> in bat_v.c, but it already included in that file. no? Marek added it recently [2]. Kind regards, Sven [1] https://git.open-mesh.org/build_test.git [2] https://git.open-mesh.org/batman-adv.git/commit/9685688ae7dd85804aec2f6ce760611551fe9635
On Sunday 08 May 2016 18:59:56 Sven Eckelmann wrote: [....] > Now you can for example run the build tests and receive the mail: > > REMOTE=/home/sven/tmp/qemu-batman/batman-adv TO=sven ./checkstuff.sh The repo was updated to support the multicast patches. I've also introduced other helper code which automatically sets the TO to the current user and makes it easier to select the branches/Linux versions to test. For example a "fast" (like in "only enough time to make a cup of tea") test would be: REMOTE=/home/sven/tmp/qemu-batman/batman-adv \ TESTBRANCHES="ecsv/misc_patches" INCOMING_BRANCH="ecsv/misc_patches" \ LINUX_VERSIONS="linux-3.2 linux-4.5" \ ./checkstuff.sh > Or you can extract the relevant part of the script (see attachment - file > paths have to be adjusted; build_test.git with prepared headers is still > required) and run it manually. Please make sure that you've committed your > changed before running it because it will remove your local changes. > > sh ~/tmp/testheaders.sh Some adjustments were necessary for the support of the new multicast compat stuff. I have updated the minimal-test shellscript (see attachments). Kind regards, Sven
diff --git a/net/batman-adv/sysfs.c b/net/batman-adv/sysfs.c index 414b207..b99ea80 100644 --- a/net/batman-adv/sysfs.c +++ b/net/batman-adv/sysfs.c @@ -389,12 +389,12 @@ static int batadv_store_uint_attr(const char *buff, size_t count, return count; } -static inline ssize_t -__batadv_store_uint_attr(const char *buff, size_t count, - int min, int max, - void (*post_func)(struct net_device *), - const struct attribute *attr, - atomic_t *attr_store, struct net_device *net_dev) +static ssize_t __batadv_store_uint_attr(const char *buff, size_t count, int min, + int max, + void (*post_func)(struct net_device *), + const struct attribute *attr, + atomic_t *attr_store, + struct net_device *net_dev) { int ret;