public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Gilad Broner <gbroner@codeaurora.org>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, santoshsy@gmail.com,
	linux-scsi-owner@vger.kernel.org, subhashj@codeaurora.org,
	ygardi@codeaurora.org, draviv@codeaurora.org,
	Lee Susman <lsusman@codeaurora.org>,
	Raviv Shvili <rshvili@codeaurora.org>,
	Vinayak Holikatti <vinholikatti@gmail.com>
Subject: Re: [PATCH v8 2/3] scsi: ufs: add debugfs for ufs
Date: Wed, 29 Apr 2015 07:43:14 -0700	[thread overview]
Message-ID: <1430318594.2189.11.camel@HansenPartnership.com> (raw)
In-Reply-To: <1429012281-24068-3-git-send-email-gbroner@codeaurora.org>

On Tue, 2015-04-14 at 14:51 +0300, Gilad Broner wrote:
> From: Lee Susman <lsusman@codeaurora.org>
> 
> Adding debugfs capability for ufshcd.
> 
> debugfs attributes introduced in this patch:
>  - View driver/controller runtime data
>  - Command tag statistics for performance analisis
>  - Dump device descriptor info
>  - Track recoverable errors statistics during runtime
>  - Change UFS power mode during runtime
>      entry a string in the format 'GGLLMM' where:
>          G - selected gear
>          L - number of lanes
>          M - power mode
>              (1=fast mode, 2=slow mode, 4=fast-auto mode,
>               5=slow-auto mode)
>      First letter is for RX, second is for TX.
>  - Get/set DME attributes
> 
> Signed-off-by: Lee Susman <lsusman@codeaurora.org>
> Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
> Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
> Signed-off-by: Raviv Shvili <rshvili@codeaurora.org>
> Signed-off-by: Gilad Broner <gbroner@codeaurora.org>

Bloody test your damn changes.  That means running them through a config
options permutation when you introduce config dependencies.

This is what happens with CONFIG_DEBUG_FS=n:

        drivers/scsi/ufs/ufshcd.c:92:9: warning: ‘struct scsi_cmd’
        declared inside parameter list [enabled by default]
          struct scsi_cmd *cmd)
                 ^
        drivers/scsi/ufs/ufshcd.c:92:9: warning: its scope is only this
        definition or declaration, which is probably not what you want
        [enabled by default]

That's a typo inside the other branch of the #ifdef ... apparently none
of your reviewers spotted it either.

        drivers/scsi/ufs/ufs-debugfs.c: In function
        ‘ufsdbg_tag_stats_show’:
        drivers/scsi/ufs/ufs-debugfs.c:60:18: error: ‘struct ufs_hba’
        has no member named ‘ufs_stats’
          ufs_stats = &hba->ufs_stats;
                          ^
        ...
        
This lot is obvious: ufs-debufs should not be compiled at all if
CONFIG_DEBUG_FS=n

>From now on, I'm not taking your code unless it has an external reviewer
who makes sure I don't keep running across crap like this.

James



  parent reply	other threads:[~2015-04-29 14:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-14 11:51 [PATCH v8 0/3] Add ioctl and debug utilities to UFS driver Gilad Broner
2015-04-14 11:51 ` [PATCH v8 1/3] scsi: ufs: add ioctl interface for query request Gilad Broner
2015-04-28 14:09   ` Dov Levenglick
2015-04-14 11:51 ` [PATCH v8 2/3] scsi: ufs: add debugfs for ufs Gilad Broner
2015-04-28 14:10   ` Dov Levenglick
2015-04-29 14:43   ` James Bottomley [this message]
2015-04-14 11:51 ` [RESEND/PATCH v8 3/3] scsi: ufs: add trace events and dump prints for debug Gilad Broner
2015-04-14 13:05   ` Steven Rostedt

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=1430318594.2189.11.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=draviv@codeaurora.org \
    --cc=gbroner@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi-owner@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=lsusman@codeaurora.org \
    --cc=rshvili@codeaurora.org \
    --cc=santoshsy@gmail.com \
    --cc=subhashj@codeaurora.org \
    --cc=vinholikatti@gmail.com \
    --cc=ygardi@codeaurora.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