public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pascal COMBES <pascom@orange.fr>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org,
	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>,
	Jarod Wilson <jarod@wilsonet.com>,
	Jingoo Han <jg1.han@samsung.com>,
	Valentina Manea <valentina.manea.m@gmail.com>,
	linux-kernel@vger.kernel.org, Naren Sankar <nsankar@broadcom.com>,
	Monam Agarwal <monamagarwal123@gmail.com>,
	Scott Davilla <davilla@4pi.com>,
	Amarjargal Gundjalam <amarjargal16@gmail.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Robert Foss <dev@robertfoss.se>
Subject: [PATCH v2 1/3] Fix alignement problems in drivers/staging/crystalhd/crystalhd_lnx.c
Date: Sun, 13 Apr 2014 21:09:18 +0200	[thread overview]
Message-ID: <534AE0DE.6020404@orange.fr> (raw)
In-Reply-To: <20140413154859.GA18189@kroah.com>

From: Pascal COMBES <pascom@orange.fr>

Fix alignement problems in drivers/staging/crystalhd/crystalhd_lnx.c.

Signed-off-by: Pascal COMBES <pascom@orange.fr>
---
As asked I split the patch in three (because I'm addressing 3 types of
problems). I also took into account your last comment: What I did seemmed 
better to me, but as I'm not the reference I discarded it.
	Regards,
Pascal COMBES.


diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c
index 20be957..fd7f08a 100644
--- a/drivers/staging/crystalhd/crystalhd_lnx.c
+++ b/drivers/staging/crystalhd/crystalhd_lnx.c
@@ -112,7 +112,7 @@ static void chd_dec_free_iodata(struct crystalhd_adp *adp,
 }
 
 static inline int crystalhd_user_data(void __user *ud, void *dr,
-			 int size, int set)
+				      int size, int set)
 {
 	int rc;
 
@@ -135,7 +135,8 @@ static inline int crystalhd_user_data(void __user *ud, void *dr,
 }
 
 static int chd_dec_fetch_cdata(struct crystalhd_adp *adp,
-	 struct crystalhd_ioctl_data *io, uint32_t m_sz, unsigned long ua)
+			       struct crystalhd_ioctl_data *io, uint32_t m_sz,
+			       unsigned long ua)
 {
 	unsigned long ua_off;
 	int rc = 0;
@@ -154,7 +155,7 @@ static int chd_dec_fetch_cdata(struct crystalhd_adp *adp,
 	io->add_cdata_sz = m_sz;
 	ua_off = ua + sizeof(io->udata);
 	rc = crystalhd_user_data((void __user *)ua_off, io->add_cdata,
-			io->add_cdata_sz, 0);
+				 io->add_cdata_sz, 0);
 	if (rc) {
 		BCMLOG_ERR("failed to pull add_cdata sz:%x ua_off:%x\n",
 			   io->add_cdata_sz, (unsigned int)ua_off);
@@ -167,7 +168,8 @@ static int chd_dec_fetch_cdata(struct crystalhd_adp *adp,
 }
 
 static int chd_dec_release_cdata(struct crystalhd_adp *adp,
-			 struct crystalhd_ioctl_data *io, unsigned long ua)
+				 struct crystalhd_ioctl_data *io,
+				 unsigned long ua)
 {
 	unsigned long ua_off;
 	int rc;
@@ -180,7 +182,7 @@ static int chd_dec_release_cdata(struct crystalhd_adp *adp,
 	if (io->cmd != BCM_IOC_FW_DOWNLOAD) {
 		ua_off = ua + sizeof(io->udata);
 		rc = crystalhd_user_data((void __user *)ua_off, io->add_cdata,
-					io->add_cdata_sz, 1);
+					 io->add_cdata_sz, 1);
 		if (rc) {
 			BCMLOG_ERR(
 				"failed to push add_cdata sz:%x ua_off:%x\n",
@@ -210,7 +212,7 @@ static int chd_dec_proc_user_data(struct crystalhd_adp *adp,
 	}
 
 	rc = crystalhd_user_data((void __user *)ua, &io->udata,
-			sizeof(io->udata), set);
+				 sizeof(io->udata), set);
 	if (rc) {
 		BCMLOG_ERR("failed to %s iodata\n", (set ? "set" : "get"));
 		return rc;
@@ -382,7 +384,7 @@ static int chd_dec_init_chdev(struct crystalhd_adp *adp)
 	}
 
 	dev = device_create(crystalhd_class, NULL,
-			 MKDEV(adp->chd_dec_major, 0), NULL, "crystalhd");
+			    MKDEV(adp->chd_dec_major, 0), NULL, "crystalhd");
 	if (IS_ERR(dev)) {
 		rc = PTR_ERR(dev);
 		BCMLOG_ERR("failed to create device\n");
@@ -398,7 +400,7 @@ static int chd_dec_init_chdev(struct crystalhd_adp *adp)
 	/* Allocate general purpose ioctl pool. */
 	for (i = 0; i < CHD_IODATA_POOL_SZ; i++) {
 		temp = kzalloc(sizeof(struct crystalhd_ioctl_data),
-					 GFP_KERNEL);
+			       GFP_KERNEL);
 		if (!temp) {
 			BCMLOG_ERR("ioctl data pool kzalloc failed\n");
 			rc = -ENOMEM;
@@ -549,9 +551,9 @@ static int chd_dec_pci_probe(struct pci_dev *pdev,
 	enum BC_STATUS sts = BC_STS_SUCCESS;
 
 	BCMLOG(BCMLOG_DBG,
-		"PCI_INFO: Vendor:0x%04x Device:0x%04x s_vendor:0x%04x s_device: 0x%04x\n",
-		pdev->vendor, pdev->device, pdev->subsystem_vendor,
-		pdev->subsystem_device);
+	       "PCI_INFO: Vendor:0x%04x Device:0x%04x s_vendor:0x%04x s_device: 0x%04x\n",
+	       pdev->vendor, pdev->device, pdev->subsystem_vendor,
+	       pdev->subsystem_device);
 
 	pinfo = kzalloc(sizeof(struct crystalhd_adp), GFP_KERNEL);
 	if (!pinfo) {


  reply	other threads:[~2014-04-13 19:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-13 15:35 [PATCH] Fix coding style in drivers/staging/crystalhd/crystalhd_lnx.c Pascal COMBES
2014-04-13 15:48 ` Greg Kroah-Hartman
2014-04-13 19:09   ` Pascal COMBES [this message]
2014-04-13 21:02     ` [PATCH v2 1/3] Fix alignement problems " Dan Carpenter
2014-04-13 21:26       ` Paul Bolle
2014-04-13 22:07         ` Dan Carpenter
2014-04-13 22:13           ` Paul Bolle
2014-04-13 22:45             ` Dan Carpenter
2014-04-13 19:13   ` [PATCH v2 2/3] Fix coding style problem (cast with space) " Pascal COMBES
2014-04-13 21:36     ` Paul Bolle
2014-04-14 16:37       ` Pascal COMBES
2014-04-15  0:44         ` Jingoo Han
2014-04-13 19:13   ` [PATCH v2 3/3] Fix coding style problem (sizeof with type) " Pascal COMBES
2014-04-15 19:21   ` [PATCH v3 1/3] Staging: crystalhd: Fix alignement in crystalhd_lnx.c Pascal COMBES
2014-04-15 19:32     ` Dan Carpenter
2014-04-15 19:21   ` [PATCH v3 2/3] Staging: crystalhd: Removed cast " Pascal COMBES
2014-04-15 19:21   ` [PATCH v3 3/3] Staging: crystalhd: Improve kzalloc calls " Pascal COMBES

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=534AE0DE.6020404@orange.fr \
    --to=pascom@orange.fr \
    --cc=amarjargal16@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=davilla@4pi.com \
    --cc=dev@robertfoss.se \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jarod@wilsonet.com \
    --cc=jg1.han@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=monamagarwal123@gmail.com \
    --cc=nsankar@broadcom.com \
    --cc=peter.p.waskiewicz.jr@intel.com \
    --cc=valentina.manea.m@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox