All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Remove a handful of unused variables
@ 2012-11-27 12:05 Colin King
  2012-11-27 12:05 ` [PATCH 1/5] fs/jfs.c: remove unused pos from grub_jfs_read_file() Colin King
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Colin King @ 2012-11-27 12:05 UTC (permalink / raw)
  To: grub-devel

From: Colin Ian King <colin.king@canonical.com>

Just a small set of changes to tidy up the code by removing unused
variables or variables that are set and never used.

Colin Ian King (5):
  fs/jfs.c: remove unused pos from grub_jfs_read_file()
  fs/minix.c: remove unused grub_minix_sblock from grub_minix_dir()
  fs/sfs.c: remove unused prev from grub_sfs_read_extent()
  fs/ufs.c: remove unused sblock from grub_ufs_dir()
  disk/lvm.c: remove da_offset, da_size from grub_lvm_scan_device()

 disk/lvm.c | 4 +---
 fs/jfs.c   | 3 ---
 fs/minix.c | 3 ---
 fs/sfs.c   | 3 ---
 fs/ufs.c   | 3 ---
 5 files changed, 1 insertion(+), 15 deletions(-)

-- 
1.8.0



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

* [PATCH 1/5] fs/jfs.c: remove unused pos from grub_jfs_read_file()
  2012-11-27 12:05 [PATCH 0/5] Remove a handful of unused variables Colin King
@ 2012-11-27 12:05 ` Colin King
  2012-11-27 12:05 ` [PATCH 2/5] fs/minix.c: remove unused grub_minix_sblock from grub_minix_dir() Colin King
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Colin King @ 2012-11-27 12:05 UTC (permalink / raw)
  To: grub-devel

From: Colin Ian King <colin.king@canonical.com>

Remove the unused pos variable from grub_jfs_read_file().

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 fs/jfs.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/jfs.c b/fs/jfs.c
index b73f9bd..88668a3 100644
--- a/fs/jfs.c
+++ b/fs/jfs.c
@@ -600,7 +600,6 @@ grub_jfs_find_file (struct grub_jfs_data *data, const char *path)
   char fpath[grub_strlen (path)];
   char *name = fpath;
   char *next;
-  unsigned int pos = 0;
   struct grub_jfs_diropen *diro;
 
   grub_strncpy (fpath, path, grub_strlen (path) + 1);
@@ -663,8 +662,6 @@ grub_jfs_find_file (struct grub_jfs_data *data, const char *path)
 	  if (!next)
 	    return 0;
 
-	  pos = 0;
-
 	  name = next;
 	  next = grub_strchr (name, '/');
 	  if (next)
-- 
1.8.0



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

* [PATCH 2/5] fs/minix.c: remove unused grub_minix_sblock from grub_minix_dir()
  2012-11-27 12:05 [PATCH 0/5] Remove a handful of unused variables Colin King
  2012-11-27 12:05 ` [PATCH 1/5] fs/jfs.c: remove unused pos from grub_jfs_read_file() Colin King
@ 2012-11-27 12:05 ` Colin King
  2012-11-27 12:05 ` [PATCH 3/5] fs/sfs.c: remove unused prev from grub_sfs_read_extent() Colin King
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Colin King @ 2012-11-27 12:05 UTC (permalink / raw)
  To: grub-devel

From: Colin Ian King <colin.king@canonical.com>

Remove the unused grub_minix_sblock variable from grub_minix_dir()

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 fs/minix.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/minix.c b/fs/minix.c
index 08eb607..2a5f35a 100644
--- a/fs/minix.c
+++ b/fs/minix.c
@@ -463,7 +463,6 @@ grub_minix_dir (grub_device_t device, const char *path,
 			       const struct grub_dirhook_info *info))
 {
   struct grub_minix_data *data = 0;
-  struct grub_minix_sblock *sblock;
   unsigned int pos = 0;
 
   data = grub_minix_mount (device->disk);
@@ -474,8 +473,6 @@ grub_minix_dir (grub_device_t device, const char *path,
   if (grub_errno)
     goto fail;
 
-  sblock = &data->sblock;
-
   grub_minix_find_file (data, path);
   if (grub_errno)
     goto fail;
-- 
1.8.0



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

* [PATCH 3/5] fs/sfs.c: remove unused prev from grub_sfs_read_extent()
  2012-11-27 12:05 [PATCH 0/5] Remove a handful of unused variables Colin King
  2012-11-27 12:05 ` [PATCH 1/5] fs/jfs.c: remove unused pos from grub_jfs_read_file() Colin King
  2012-11-27 12:05 ` [PATCH 2/5] fs/minix.c: remove unused grub_minix_sblock from grub_minix_dir() Colin King
@ 2012-11-27 12:05 ` Colin King
  2012-11-27 12:05 ` [PATCH 4/5] fs/ufs.c: remove unused sblock from grub_ufs_dir() Colin King
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Colin King @ 2012-11-27 12:05 UTC (permalink / raw)
  To: grub-devel

From: Colin Ian King <colin.king@canonical.com>

Remove unused variable prev from grub_sfs_read_extent()

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 fs/sfs.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/sfs.c b/fs/sfs.c
index ec59b73..a6ff7b9 100644
--- a/fs/sfs.c
+++ b/fs/sfs.c
@@ -149,7 +149,6 @@ grub_sfs_read_extent (struct grub_sfs_data *data, unsigned int block,
   struct grub_sfs_btree *tree;
   int i;
   int next;
-  int prev;
 
   treeblock = grub_malloc (data->blocksize);
   if (!block)
@@ -161,8 +160,6 @@ grub_sfs_read_extent (struct grub_sfs_data *data, unsigned int block,
   /* Handle this level in the btree.  */
   do
     {
-      prev = 0;
-
       grub_disk_read (data->disk, next, 0, data->blocksize, treeblock);
       if (grub_errno)
 	{
-- 
1.8.0



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

* [PATCH 4/5] fs/ufs.c: remove unused sblock from grub_ufs_dir()
  2012-11-27 12:05 [PATCH 0/5] Remove a handful of unused variables Colin King
                   ` (2 preceding siblings ...)
  2012-11-27 12:05 ` [PATCH 3/5] fs/sfs.c: remove unused prev from grub_sfs_read_extent() Colin King
@ 2012-11-27 12:05 ` Colin King
  2012-11-27 12:05 ` [PATCH 5/5] disk/lvm.c: remove da_offset, da_size from grub_lvm_scan_device() Colin King
  2012-11-28 12:26 ` [PATCH 0/5] Remove a handful of unused variables Vladimir 'φ-coder/phcoder' Serbinenko
  5 siblings, 0 replies; 7+ messages in thread
From: Colin King @ 2012-11-27 12:05 UTC (permalink / raw)
  To: grub-devel

From: Colin Ian King <colin.king@canonical.com>

Removed unused variable sblock from grub_ufs_dir()

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 fs/ufs.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/ufs.c b/fs/ufs.c
index c94ad99..ee7058b 100644
--- a/fs/ufs.c
+++ b/fs/ufs.c
@@ -568,7 +568,6 @@ grub_ufs_dir (grub_device_t device, const char *path,
 			    const struct grub_dirhook_info *info))
 {
   struct grub_ufs_data *data;
-  struct grub_ufs_sblock *sblock;
   unsigned int pos = 0;
 
   data = grub_ufs_mount (device->disk);
@@ -579,8 +578,6 @@ grub_ufs_dir (grub_device_t device, const char *path,
   if (grub_errno)
     return grub_errno;
 
-  sblock = &data->sblock;
-
   if (!path || path[0] != '/')
     {
       grub_error (GRUB_ERR_BAD_FILENAME, "bad filename");
-- 
1.8.0



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

* [PATCH 5/5] disk/lvm.c: remove da_offset, da_size from grub_lvm_scan_device()
  2012-11-27 12:05 [PATCH 0/5] Remove a handful of unused variables Colin King
                   ` (3 preceding siblings ...)
  2012-11-27 12:05 ` [PATCH 4/5] fs/ufs.c: remove unused sblock from grub_ufs_dir() Colin King
@ 2012-11-27 12:05 ` Colin King
  2012-11-28 12:26 ` [PATCH 0/5] Remove a handful of unused variables Vladimir 'φ-coder/phcoder' Serbinenko
  5 siblings, 0 replies; 7+ messages in thread
From: Colin King @ 2012-11-27 12:05 UTC (permalink / raw)
  To: grub-devel

From: Colin Ian King <colin.king@canonical.com>

Removed variables da_offset, da_size from grub_lvm_scan_device(),
these are being set but never used.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 disk/lvm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/disk/lvm.c b/disk/lvm.c
index 126b494..7bb1e24 100644
--- a/disk/lvm.c
+++ b/disk/lvm.c
@@ -207,7 +207,7 @@ grub_lvm_scan_device (const char *name)
 {
   grub_err_t err;
   grub_disk_t disk;
-  grub_uint64_t da_offset, da_size, mda_offset, mda_size;
+  grub_uint64_t mda_offset, mda_size;
   char buf[GRUB_LVM_LABEL_SIZE];
   char vg_id[GRUB_LVM_ID_STRLEN+1];
   char pv_id[GRUB_LVM_ID_STRLEN+1];
@@ -254,8 +254,6 @@ grub_lvm_scan_device (const char *name)
   pv_id[j] = '\0';
 
   dlocn = pvh->disk_areas_xl;
-  da_offset = grub_le_to_cpu64 (dlocn->offset);
-  da_size = grub_le_to_cpu64 (dlocn->size);
 
   dlocn++;
   /* Is it possible to have multiple data/metadata areas? I haven't
-- 
1.8.0



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

* Re: [PATCH 0/5] Remove a handful of unused variables
  2012-11-27 12:05 [PATCH 0/5] Remove a handful of unused variables Colin King
                   ` (4 preceding siblings ...)
  2012-11-27 12:05 ` [PATCH 5/5] disk/lvm.c: remove da_offset, da_size from grub_lvm_scan_device() Colin King
@ 2012-11-28 12:26 ` Vladimir 'φ-coder/phcoder' Serbinenko
  5 siblings, 0 replies; 7+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2012-11-28 12:26 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

On 27.11.2012 13:05, Colin King wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> Just a small set of changes to tidy up the code by removing unused
> variables or variables that are set and never used.
> 

It doesn't look like you use current bzr trunk

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

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

end of thread, other threads:[~2012-11-28 12:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27 12:05 [PATCH 0/5] Remove a handful of unused variables Colin King
2012-11-27 12:05 ` [PATCH 1/5] fs/jfs.c: remove unused pos from grub_jfs_read_file() Colin King
2012-11-27 12:05 ` [PATCH 2/5] fs/minix.c: remove unused grub_minix_sblock from grub_minix_dir() Colin King
2012-11-27 12:05 ` [PATCH 3/5] fs/sfs.c: remove unused prev from grub_sfs_read_extent() Colin King
2012-11-27 12:05 ` [PATCH 4/5] fs/ufs.c: remove unused sblock from grub_ufs_dir() Colin King
2012-11-27 12:05 ` [PATCH 5/5] disk/lvm.c: remove da_offset, da_size from grub_lvm_scan_device() Colin King
2012-11-28 12:26 ` [PATCH 0/5] Remove a handful of unused variables Vladimir 'φ-coder/phcoder' Serbinenko

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.