All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amitoj Kaur Chawla <amitoj1606@gmail.com>
To: outreachy-kernel@googlegroups.com
Subject: [PATCH 0/6] staging: Remove unnecessary *_set_drvdata()
Date: Thu, 25 Feb 2016 11:07:14 +0530	[thread overview]
Message-ID: <cover.1456377485.git.amitoj1606@gmail.com> (raw)

Unnecessary [platform|pci|spi|dev]_set_drvdata() have been removed 
since the driver core clears the driver data to NULL after device 
release or on probe failure. There is no need to manually clear the 
device driver data to NULL.

The Coccinelle semantic patch used to make this change is as follows:
// <smpl>
@@
struct platform_device *pdev;
@@
- platform_set_drvdata(pdev, NULL);
@@
struct pci_dev *pci;
@@
- pci_set_drvdata(pci, NULL);
@@
struct spi_device *spi;
@@
- spi_set_drvdata(spi, NULL);
@@
struct device *dev;
@@
- dev_set_drvdata(dev, NULL);
@@
struct amba_device *dev;
@@
- amba_set_drvdata(dev, NULL);
// </smpl>

Amitoj Kaur Chawla (6):
  staging: fbtft: Remove unnecessary spi_set_drvdata()
  staging: sm750fb: Remove unnecessary pci_set_drvdata()
  staging: media: omap4iss: Remove unnecessary platform_set_drvdata()
  staging: unisys: visorbus: Remove unnecessary dev_set_drvdata()
  staging: rdma: hfi1: Remove unnecessary pci_set_drvdata()
  staging: rts5208: Remove unnecessary pci_set_drvdata()

 drivers/staging/fbtft/fbtft-core.c              | 5 -----
 drivers/staging/media/omap4iss/iss.c            | 2 --
 drivers/staging/rdma/hfi1/pcie.c                | 2 --
 drivers/staging/rts5208/rtsx.c                  | 2 --
 drivers/staging/sm750fb/sm750.c                 | 1 -
 drivers/staging/unisys/visorbus/visorbus_main.c | 1 -
 6 files changed, 13 deletions(-)

-- 
1.9.1



             reply	other threads:[~2016-02-25  5:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25  5:37 Amitoj Kaur Chawla [this message]
2016-02-25  5:37 ` [PATCH 1/6] staging: fbtft: Remove unnecessary spi_set_drvdata() Amitoj Kaur Chawla
2016-02-25  5:37 ` [PATCH 2/6] staging: sm750fb: Remove unnecessary pci_set_drvdata() Amitoj Kaur Chawla
2016-02-25  5:37 ` [PATCH 3/6] staging: media: omap4iss: Remove unnecessary platform_set_drvdata() Amitoj Kaur Chawla
2016-02-25  5:37 ` [PATCH 4/6] staging: unisys: visorbus: Remove unnecessary dev_set_drvdata() Amitoj Kaur Chawla
2016-02-25  5:38 ` [PATCH 5/6] staging: rdma: hfi1: Remove unnecessary pci_set_drvdata() Amitoj Kaur Chawla
2016-02-25  5:38 ` [PATCH 6/6] staging: rts5208: " Amitoj Kaur Chawla
2016-02-25  7:09 ` [Outreachy kernel] [PATCH 0/6] staging: Remove unnecessary *_set_drvdata() Julia Lawall
2016-02-25  7:15   ` Amitoj Kaur Chawla
2016-02-25  7:29     ` Julia Lawall

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=cover.1456377485.git.amitoj1606@gmail.com \
    --to=amitoj1606@gmail.com \
    --cc=outreachy-kernel@googlegroups.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.