linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: "Christopher Sacchi" <chris.sacchi@gmail.com>
Cc: linux-wireless@vger.kernel.org,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH]: Mac80211 driver and I checked the patch
Date: Mon, 6 Aug 2012 19:59:25 +0200	[thread overview]
Message-ID: <502005FD.10102@broadcom.com> (raw)
In-Reply-To: <CAGh4K3Lym9yETNbMutfjNuANrgwtvfrGes6emr3Mvhx47D3B2g@mail.gmail.com>

Very generic subject line. I would expect something like:

[PATCH] mac80211: include rfkill header implicitly

On 08/06/2012 01:49 PM, Christopher Sacchi wrote:
> The source file needed a change  that was told in the description to
> know that the #include needed to be fixed, and the function changed
> another value to 0 (yes) in the description (that said FIXME.) The
> patch fixes a typo-like error and has been checked with checkpatch.pl
> in the scripts directory.


> Here's the patch:

Do need a heads-up stating the obvious.
> --
> --- main.c	2012-07-21 20:58:29.000000000 +0000
> +++ mainnew.c	2012-08-05 20:00:37.000000000 +0000

How did you create this patch? diff -U? When I try to apply your patch:

$ git am patches/mac80211-crappy-patch-test.eml
Applying: Mac80211 driver and I checked the patch
error: mainnew.c: does not exist in index
Patch failed at 0001 Mac80211 driver and I checked the patch
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".

You really should do your changes in a git repository.

I changed it to:

--- a/net/mac80211/main.c	2012-07-21 20:58:29.000000000 +0000
+++ b/net/mac80211/main.c	2012-08-05 20:00:37.000000000 +0000

and applied it. That applied, but it does not build.

> @@ -32,7 +32,7 @@
>  #include "led.h"
>  #include "cfg.h"
>  #include "debugfs.h"
> -
> +#include "net/rfkill/rfkill.h"

add empty line between #include and function prototype.

>  static struct lock_class_key ieee80211_rx_skb_queue_class;
> 
>  void ieee80211_configure_filter(struct ieee80211_local *local)
> @@ -183,6 +183,7 @@ int ieee80211_hw_config(struct ieee80211
>  		 *
>  		 */
>  		/* WARN_ON(ret); */
> +		WARN_ON(1)

Still no ';' here.

>  	}
> 
>  	return ret;
> Signed-off-by: Christopher P. Sacchi <chris.sacchi@gmail.com>

Now this line will be added in the code. You really do not want that! (I
hope).

> --
> 

More general: What are you trying to change? I did take a look in
net/mac80211/main.c and found the FIXME you refer to:

int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
{
	:
	:
        if (changed && local->open_count) {
                ret = drv_config(local, changed);
                /*
                 * Goal:
                 * HW reconfiguration should never fail, the driver has told
                 * us what it can support so it should live up to that
promise.
                 *
                 * Current status:
                 * rfkill is not integrated with mac80211 and a
                 * configuration command can thus fail if hardware rfkill
                 * is enabled
                 *
                 * FIXME: integrate rfkill with mac80211 and then add this
                 * WARN_ON() back
                 *
                 */
                /* WARN_ON(ret); */
        }

        return ret;
}

Back to your change:
1) You are a WARN_ON(1). So on every drv_config() call you get a kernel
warning. Unlikely we want that.
2) For the warning to be put back, the comment says "integrate rfkill
with mac80211". Adding an include of the rfkill header file does not
really cover that statement.

All in all you seem to forget a number of steps in
Documentation/SubmittingPatches. Apart from passing checkpatch.pl it
should first of all at least compile :-(

Gr. AvS


  parent reply	other threads:[~2012-08-06 17:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-06 11:49 [PATCH]: Mac80211 driver and I checked the patch Christopher Sacchi
2012-08-06 16:41 ` Dan Williams
2012-08-06 17:59 ` Arend van Spriel [this message]
2012-08-06 18:01   ` Arend van Spriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=502005FD.10102@broadcom.com \
    --to=arend@broadcom.com \
    --cc=chris.sacchi@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).