All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Steve French <sfrench@samba.org>,
	CIFS <linux-cifs@vger.kernel.org>,
	samba-technical <samba-technical@lists.samba.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [PATCH 1/2] cifs: remove unused status severity defines
Date: Thu, 14 Mar 2019 02:04:42 -0500	[thread overview]
Message-ID: <CAH2r5msCs5ks3FUi_GhV2REsUR8t2h1=ybgLS6FyBEyka7Qb9g@mail.gmail.com> (raw)
In-Reply-To: <CAH2r5msYG4H19GK1Fmnqb1dNCcp2qahULc_t4v9qdJ=OOZmGXg@mail.gmail.com>

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

updated it to fix the spelling mistake


On Thu, Mar 14, 2019 at 1:54 AM Steve French <smfrench@gmail.com> wrote:
>
> Since this file (smb2status.h) is intended to track the official
> protocol documentation (albeit smb2status.h probably needs to be
> updated), in this case the protocol document MS-ERREF.  I would prefer
> to keep it closer to MS-ERREF and leave definitions in even if unused
> (if nothing else it helps some of us when debugging to recognize what
> these errors on the wire mean).  There is a real danger that we have
> run into in the past that in removing some protocol definitions
> (flags, etc.) from the code or forgetting to update our headers to
> match newer versions of the protocol specifications, that  with future
> code changes we can forget to handle flags (for example) or misparse
> responses due to not realizing that there are additional flags that
> need to be parsed.
>
> On Thu, Mar 14, 2019 at 1:17 AM Sergey Senozhatsky
> <sergey.senozhatsky.work@gmail.com> wrote:
> >
> > STATUS_SEVERITY_* do not appear to be used by anyone, so
> > drop them. Besides, the name of __constant_cpu_to_le32()
> > is misspelled there: __constanst_cpu_to_le32().
> >
> > Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> > ---
> >  fs/cifs/smb2status.h | 5 -----
> >  1 file changed, 5 deletions(-)
> >
> > diff --git a/fs/cifs/smb2status.h b/fs/cifs/smb2status.h
> > index 3d5f62150de4..e9da9c6da277 100644
> > --- a/fs/cifs/smb2status.h
> > +++ b/fs/cifs/smb2status.h
> > @@ -29,11 +29,6 @@
> >   *  C is set if "customer defined" error, N bit is reserved and MBZ
> >   */
> >
> > -#define STATUS_SEVERITY_SUCCESS __constant_cpu_to_le32(0x0000)
> > -#define STATUS_SEVERITY_INFORMATIONAL __constanst_cpu_to_le32(0x0001)
> > -#define STATUS_SEVERITY_WARNING __constanst_cpu_to_le32(0x0002)
> > -#define STATUS_SEVERITY_ERROR __constanst_cpu_to_le32(0x0003)
> > -
> >  struct ntstatus {
> >         /* Facility is the high 12 bits of the following field */
> >         __le32 Facility; /* low 2 bits Severity, next is Customer, then rsrvd */
> > --
> > 2.21.0
> >
>
>
> --
> Thanks,
>
> Steve



-- 
Thanks,

Steve

[-- Attachment #2: 0001-smb2-fix-typo-in-definition-of-a-few-error-flags.patch --]
[-- Type: text/x-patch, Size: 1275 bytes --]

From c1d061d2d47d536d7674a162937b51d8dd7ac7dc Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Thu, 14 Mar 2019 01:56:34 -0500
Subject: [PATCH] smb2: fix typo in definition of a few error flags

As Sergey Senozhatsky pointed out __constant_cpu_to_le32()
is misspelled in a few definitions in the list of status
codes smb2status.h as __constanst_cpu_to_le32()

Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
 fs/cifs/smb2status.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/cifs/smb2status.h b/fs/cifs/smb2status.h
index 3d5f62150de4..f5429c8bfb0d 100644
--- a/fs/cifs/smb2status.h
+++ b/fs/cifs/smb2status.h
@@ -30,9 +30,9 @@
  */
 
 #define STATUS_SEVERITY_SUCCESS __constant_cpu_to_le32(0x0000)
-#define STATUS_SEVERITY_INFORMATIONAL __constanst_cpu_to_le32(0x0001)
-#define STATUS_SEVERITY_WARNING __constanst_cpu_to_le32(0x0002)
-#define STATUS_SEVERITY_ERROR __constanst_cpu_to_le32(0x0003)
+#define STATUS_SEVERITY_INFORMATIONAL cpu_to_le32(0x0001)
+#define STATUS_SEVERITY_WARNING cpu_to_le32(0x0002)
+#define STATUS_SEVERITY_ERROR cpu_to_le32(0x0003)
 
 struct ntstatus {
 	/* Facility is the high 12 bits of the following field */
-- 
2.17.1


  reply	other threads:[~2019-03-14  7:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-14  6:17 [PATCH 1/2] cifs: remove unused status severity defines Sergey Senozhatsky
2019-03-14  6:17 ` [PATCH 2/2] cifs: don't use __constant_cpu_to_le32() Sergey Senozhatsky
2019-03-15 12:31   ` David Laight
2019-03-15 14:29     ` Sergey Senozhatsky
2019-03-14  6:54 ` [PATCH 1/2] cifs: remove unused status severity defines Steve French
2019-03-14  7:04   ` Steve French [this message]
2019-03-14  7:12     ` Sergey Senozhatsky
2019-03-14  7:19       ` Steve French
2019-03-14  7:39         ` Sergey Senozhatsky
2019-03-14  8:03           ` Steve French
2019-03-14  7:08   ` Sergey Senozhatsky

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='CAH2r5msCs5ks3FUi_GhV2REsUR8t2h1=ybgLS6FyBEyka7Qb9g@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samba-technical@lists.samba.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=sfrench@samba.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 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.