mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <ahmad@a3f.at>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] fs: remove unused members of struct stat
Date: Fri, 3 Feb 2023 08:56:28 +0100	[thread overview]
Message-ID: <20230203075628.GO13319@pengutronix.de> (raw)
In-Reply-To: <20230202142512.3551195-1-ahmad@a3f.at>

On Thu, Feb 02, 2023 at 03:25:12PM +0100, Ahmad Fatoum wrote:
> Some members in struct stat are never written, so drop them.
> 
> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
> ---
>  fs/fs.c              | 4 ++--
>  include/linux/stat.h | 3 ---
>  2 files changed, 2 insertions(+), 5 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/fs/fs.c b/fs/fs.c
> index c463466e1be0..4837c4b701bc 100644
> --- a/fs/fs.c
> +++ b/fs/fs.c
> @@ -160,9 +160,9 @@ void stat_print(const char *filename, const struct stat *st)
>  
>  	fdev = get_fsdevice_by_path(filename);
>  
> -	printf("\nDevice: %s\tInode: %lu\tLinks: %u\n",
> +	printf("\nDevice: %s\tInode: %lu\n",
>  	       fdev ? dev_name(&fdev->dev) : "<unknown>",
> -	       st->st_ino, st->st_nlink);
> +	       st->st_ino);
>  	printf("Access: (%04o/%s)\tUid: (%u)\tGid: (%u)\n",
>  	       st->st_mode & 07777, modestr, st->st_uid, st->st_gid);
>  
> diff --git a/include/linux/stat.h b/include/linux/stat.h
> index 2bdf3ec9c96c..fc3dd222a673 100644
> --- a/include/linux/stat.h
> +++ b/include/linux/stat.h
> @@ -49,11 +49,8 @@ extern "C" {
>  struct stat {
>  	unsigned long st_ino;
>  	unsigned short st_mode;
> -	unsigned short st_nlink;
>  	unsigned short st_uid;
>  	unsigned short st_gid;
> -	unsigned short st_rdev;
> -	unsigned short __pad2;
>  	loff_t  st_size;
>  };
>  
> -- 
> 2.38.1
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      reply	other threads:[~2023-02-03  7:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 14:25 Ahmad Fatoum
2023-02-03  7:56 ` Sascha Hauer [this message]

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=20230203075628.GO13319@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=ahmad@a3f.at \
    --cc=barebox@lists.infradead.org \
    /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