public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] staging: unisys: remove unused functions
@ 2015-05-07  9:36 Sudip Mukherjee
  2015-05-07  9:36 ` [PATCH 2/2] staging: unisys: remove unused variable Sudip Mukherjee
  0 siblings, 1 reply; 8+ messages in thread
From: Sudip Mukherjee @ 2015-05-07  9:36 UTC (permalink / raw)
  To: Benjamin Romer, David Kershner, Greg Kroah-Hartman
  Cc: sparmaintainer, devel, linux-kernel, Sudip Mukherjee

these functions were just defined and never used.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/staging/unisys/visorchipset/visorchipset.h |  4 ---
 .../unisys/visorchipset/visorchipset_main.c        | 41 ----------------------
 2 files changed, 45 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/visorchipset.h b/drivers/staging/unisys/visorchipset/visorchipset.h
index 87b63f0..fb10b46 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset.h
+++ b/drivers/staging/unisys/visorchipset/visorchipset.h
@@ -224,9 +224,5 @@ int visorchipset_chipset_selftest(void);
 int visorchipset_chipset_notready(void);
 void visorchipset_save_message(struct controlvm_message *msg,
 			       enum crash_obj_type type);
-void *visorchipset_cache_alloc(struct kmem_cache *pool,
-			       bool ok_to_block, char *fn, int ln);
-void visorchipset_cache_free(struct kmem_cache *pool, void *p,
-			     char *fn, int ln);
 
 #endif
diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index 90e41cb..0468dc2 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -2045,47 +2045,6 @@ visorchipset_set_device_context(u32 bus_no, u32 dev_no, void *context)
 }
 EXPORT_SYMBOL_GPL(visorchipset_set_device_context);
 
-/* Generic wrapper function for allocating memory from a kmem_cache pool.
- */
-void *
-visorchipset_cache_alloc(struct kmem_cache *pool, bool ok_to_block,
-			 char *fn, int ln)
-{
-	gfp_t gfp;
-	void *p;
-
-	if (ok_to_block)
-		gfp = GFP_KERNEL;
-	else
-		gfp = GFP_ATOMIC;
-	/* __GFP_NORETRY means "ok to fail", meaning
-	 * kmem_cache_alloc() can return NULL, implying the caller CAN
-	 * cope with failure.  If you do NOT specify __GFP_NORETRY,
-	 * Linux will go to extreme measures to get memory for you
-	 * (like, invoke oom killer), which will probably cripple the
-	 * system.
-	 */
-	gfp |= __GFP_NORETRY;
-	p = kmem_cache_alloc(pool, gfp);
-	if (!p)
-		return NULL;
-
-	atomic_inc(&visorchipset_cache_buffers_in_use);
-	return p;
-}
-
-/* Generic wrapper function for freeing memory from a kmem_cache pool.
- */
-void
-visorchipset_cache_free(struct kmem_cache *pool, void *p, char *fn, int ln)
-{
-	if (!p)
-		return;
-
-	atomic_dec(&visorchipset_cache_buffers_in_use);
-	kmem_cache_free(pool, p);
-}
-
 static ssize_t chipsetready_store(struct device *dev,
 				  struct device_attribute *attr,
 				  const char *buf, size_t count)
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] staging: unisys: remove unused variable
  2015-05-07  9:36 [PATCH 1/2] staging: unisys: remove unused functions Sudip Mukherjee
@ 2015-05-07  9:36 ` Sudip Mukherjee
  2015-05-07 20:04   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Sudip Mukherjee @ 2015-05-07  9:36 UTC (permalink / raw)
  To: Benjamin Romer, David Kershner, Greg Kroah-Hartman
  Cc: sparmaintainer, devel, linux-kernel, Sudip Mukherjee

the previous patch of the series made this variable unused.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/staging/unisys/visorchipset/visorchipset_main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index 0468dc2..1f4c529 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -200,8 +200,6 @@ struct putfile_request {
 	int completion_status;
 };
 
-static atomic_t visorchipset_cache_buffers_in_use = ATOMIC_INIT(0);
-
 struct parahotplug_request {
 	struct list_head list;
 	int id;
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] staging: unisys: remove unused variable
  2015-05-07  9:36 ` [PATCH 2/2] staging: unisys: remove unused variable Sudip Mukherjee
@ 2015-05-07 20:04   ` Greg Kroah-Hartman
  2015-05-08  4:24     ` Sudip Mukherjee
  0 siblings, 1 reply; 8+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-07 20:04 UTC (permalink / raw)
  To: Sudip Mukherjee
  Cc: Benjamin Romer, David Kershner, devel, sparmaintainer,
	linux-kernel

On Thu, May 07, 2015 at 03:06:52PM +0530, Sudip Mukherjee wrote:
> the previous patch of the series made this variable unused.

What do you mean?  There was only one other patch in this series, never
send a patch that causes a build warning.

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] staging: unisys: remove unused variable
  2015-05-07 20:04   ` Greg Kroah-Hartman
@ 2015-05-08  4:24     ` Sudip Mukherjee
  2015-05-08  7:19       ` Greg Kroah-Hartman
  2015-05-08  7:34       ` Dan Carpenter
  0 siblings, 2 replies; 8+ messages in thread
From: Sudip Mukherjee @ 2015-05-08  4:24 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Benjamin Romer, David Kershner, devel, sparmaintainer,
	linux-kernel

On Thu, May 07, 2015 at 10:04:32PM +0200, Greg Kroah-Hartman wrote:
> On Thu, May 07, 2015 at 03:06:52PM +0530, Sudip Mukherjee wrote:
> > the previous patch of the series made this variable unused.
> 
> What do you mean?  There was only one other patch in this series, never
> send a patch that causes a build warning.
This patch is 2/2 , the 1/2 patch when applied will cause a build
warning about unused variable.

should i then send a v2 mentioning that "1/2 will cause a build warning
which is fixed in 2/2" ?

regards
sudip
> 
> greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] staging: unisys: remove unused variable
  2015-05-08  4:24     ` Sudip Mukherjee
@ 2015-05-08  7:19       ` Greg Kroah-Hartman
  2015-05-08  7:34       ` Dan Carpenter
  1 sibling, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-08  7:19 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: devel, Benjamin Romer, linux-kernel, sparmaintainer

On Fri, May 08, 2015 at 09:54:44AM +0530, Sudip Mukherjee wrote:
> On Thu, May 07, 2015 at 10:04:32PM +0200, Greg Kroah-Hartman wrote:
> > On Thu, May 07, 2015 at 03:06:52PM +0530, Sudip Mukherjee wrote:
> > > the previous patch of the series made this variable unused.
> > 
> > What do you mean?  There was only one other patch in this series, never
> > send a patch that causes a build warning.
> This patch is 2/2 , the 1/2 patch when applied will cause a build
> warning about unused variable.
> 
> should i then send a v2 mentioning that "1/2 will cause a build warning
> which is fixed in 2/2" ?

No, you fix 1/2 to not create a build warning.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] staging: unisys: remove unused variable
  2015-05-08  4:24     ` Sudip Mukherjee
  2015-05-08  7:19       ` Greg Kroah-Hartman
@ 2015-05-08  7:34       ` Dan Carpenter
  2015-05-08  7:54         ` Sudip Mukherjee
  1 sibling, 1 reply; 8+ messages in thread
From: Dan Carpenter @ 2015-05-08  7:34 UTC (permalink / raw)
  To: Sudip Mukherjee
  Cc: Greg Kroah-Hartman, devel, Benjamin Romer, linux-kernel,
	sparmaintainer

On Fri, May 08, 2015 at 09:54:44AM +0530, Sudip Mukherjee wrote:
> On Thu, May 07, 2015 at 10:04:32PM +0200, Greg Kroah-Hartman wrote:
> > On Thu, May 07, 2015 at 03:06:52PM +0530, Sudip Mukherjee wrote:
> > > the previous patch of the series made this variable unused.
> > 
> > What do you mean?  There was only one other patch in this series, never
> > send a patch that causes a build warning.
> This patch is 2/2 , the 1/2 patch when applied will cause a build
> warning about unused variable.
> 
> should i then send a v2 mentioning that "1/2 will cause a build warning
> which is fixed in 2/2" ?
> 

Gar...  No.  Fold them together into one patch...

The one thing per patch rule means that you shouldn't do half a thing
per patch.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] staging: unisys: remove unused variable
  2015-05-08  7:34       ` Dan Carpenter
@ 2015-05-08  7:54         ` Sudip Mukherjee
  2015-05-08  9:04           ` Dan Carpenter
  0 siblings, 1 reply; 8+ messages in thread
From: Sudip Mukherjee @ 2015-05-08  7:54 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Greg Kroah-Hartman, devel, Benjamin Romer, linux-kernel,
	sparmaintainer

On Fri, May 08, 2015 at 10:34:49AM +0300, Dan Carpenter wrote:
> On Fri, May 08, 2015 at 09:54:44AM +0530, Sudip Mukherjee wrote:
> > On Thu, May 07, 2015 at 10:04:32PM +0200, Greg Kroah-Hartman wrote:
> > > On Thu, May 07, 2015 at 03:06:52PM +0530, Sudip Mukherjee wrote:
> > > > the previous patch of the series made this variable unused.
> > > 
> > > What do you mean?  There was only one other patch in this series, never
> > > send a patch that causes a build warning.
> > This patch is 2/2 , the 1/2 patch when applied will cause a build
> > warning about unused variable.
> > 
> > should i then send a v2 mentioning that "1/2 will cause a build warning
> > which is fixed in 2/2" ?
> > 
> 
> Gar...  No.  Fold them together into one patch...
> 
> The one thing per patch rule means that you shouldn't do half a thing
> per patch.

already sent that one combined patch.

but this rule is really confusing me now .. :(
if i can understand the devicemodel then this rule should not be tough
to understand.
so, what i understood till now:
1) any patch of the series should not break the build.
	(you told me that in my parport patch series :) )

2) any patch of the series should not introduce build warning.

3) when i am modifying some line, i can make simple changes in style.
	but if its big change in style then that should be a separate
	patch.

regards
sudip

> 
> regards,
> dan carpenter
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] staging: unisys: remove unused variable
  2015-05-08  7:54         ` Sudip Mukherjee
@ 2015-05-08  9:04           ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2015-05-08  9:04 UTC (permalink / raw)
  To: Sudip Mukherjee
  Cc: devel, Greg Kroah-Hartman, Benjamin Romer, sparmaintainer,
	linux-kernel

On Fri, May 08, 2015 at 01:24:32PM +0530, Sudip Mukherjee wrote:

> so, what i understood till now:
> 1) any patch of the series should not break the build.
> 	(you told me that in my parport patch series :) )
> 
> 2) any patch of the series should not introduce build warning.
> 
> 3) when i am modifying some line, i can make simple changes in style.
> 	but if its big change in style then that should be a separate
> 	patch.
> 

Yes.

regards,
carpenter


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-05-08  9:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-07  9:36 [PATCH 1/2] staging: unisys: remove unused functions Sudip Mukherjee
2015-05-07  9:36 ` [PATCH 2/2] staging: unisys: remove unused variable Sudip Mukherjee
2015-05-07 20:04   ` Greg Kroah-Hartman
2015-05-08  4:24     ` Sudip Mukherjee
2015-05-08  7:19       ` Greg Kroah-Hartman
2015-05-08  7:34       ` Dan Carpenter
2015-05-08  7:54         ` Sudip Mukherjee
2015-05-08  9:04           ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox