All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Manish Mandlik <mmandlik@google.com>
Cc: Arend van Spriel <aspriel@gmail.com>,
	marcel@holtmann.org, luiz.dentz@gmail.com,
	Johannes Berg <johannes@sipsolutions.net>,
	Dan Williams <dan.j.williams@intel.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	linux-bluetooth@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	chromeos-bluetooth-upstreaming@chromium.org,
	Won Chung <wonchung@google.com>,
	Abhishek Pandit-Subedi <abhishekpandit@chromium.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 4/5] Bluetooth: btusb: Add btusb devcoredump support
Date: Wed, 10 Aug 2022 18:20:24 +0200	[thread overview]
Message-ID: <YvPayNHamzrt+xxF@kroah.com> (raw)
In-Reply-To: <20220810085753.v5.4.Id0d6e772f00432d55f6bcbf68a50cb4ad89396c6@changeid>

On Wed, Aug 10, 2022 at 09:00:37AM -0700, Manish Mandlik wrote:
> This patch implements the btusb driver side .coredump() callback to
> trigger a devcoredump via sysfs and .enable_coredump() callback to
> check if the devcoredump functionality is enabled for a device.
> 
> Signed-off-by: Manish Mandlik <mmandlik@google.com>
> Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> ---
> 
> (no changes since v4)
> 
> Changes in v4:
> - New patch in the series
> 
>  drivers/bluetooth/btusb.c | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index 30dd443f395f..b00851327aa3 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -1510,6 +1510,15 @@ static void btusb_isoc_tx_complete(struct urb *urb)
>  	kfree_skb(skb);
>  }
>  
> +#ifdef CONFIG_DEV_COREDUMP
> +static bool btusb_coredump_enabled(struct hci_dev *hdev)
> +{
> +	struct btusb_data *data = hci_get_drvdata(hdev);
> +
> +	return !data->intf->dev.coredump_disabled;
> +}
> +#endif

Again, #ifdef in .c files is unmaintainable over time, please do not do
it if at all possible.

thanks,

greg k-h

  reply	other threads:[~2022-08-10 16:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 16:00 [PATCH v5 1/5] sysfs: Add attribute info for /sys/devices/.../coredump_disabled Manish Mandlik
2022-08-10 16:00 ` [PATCH v5 2/5] devcoredump: Add per device sysfs entry to enable/disable coredump Manish Mandlik
2022-08-10 16:00 ` [PATCH v5 3/5] Bluetooth: Add support for hci devcoredump Manish Mandlik
2022-08-10 16:19   ` Greg Kroah-Hartman
2022-08-12 18:59   ` kernel test robot
2022-08-12 19:19   ` kernel test robot
2022-08-10 16:00 ` [PATCH v5 4/5] Bluetooth: btusb: Add btusb devcoredump support Manish Mandlik
2022-08-10 16:20   ` Greg Kroah-Hartman [this message]
2022-08-10 16:00 ` [PATCH v5 5/5] Bluetooth: btintel: Add Intel " Manish Mandlik
2022-08-10 16:21   ` Greg Kroah-Hartman
2022-08-10 16:03 ` [PATCH v5 1/5] sysfs: Add attribute info for /sys/devices/.../coredump_disabled Johannes Berg
2022-08-10 16:21   ` Greg Kroah-Hartman
     [not found]     ` <CAGPPCLAV=mnMcteCnqFT5zdbWdZuFQRv6-oxC3qAnLh8_8H61Q@mail.gmail.com>
2022-08-12  6:09       ` Greg Kroah-Hartman
2022-08-13  9:39         ` Arend van Spriel
2022-08-10 16:22 ` Greg Kroah-Hartman
2022-08-10 17:25 ` [v5,1/5] " bluez.test.bot

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=YvPayNHamzrt+xxF@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=abhishekpandit@chromium.org \
    --cc=aspriel@gmail.com \
    --cc=chromeos-bluetooth-upstreaming@chromium.org \
    --cc=dan.j.williams@intel.com \
    --cc=jgg@ziepe.ca \
    --cc=johan.hedberg@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=mmandlik@google.com \
    --cc=rafael@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=wonchung@google.com \
    /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 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.