All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasikumar PC <sasikumar.pc@broadcom.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "PDL,MEGARAIDLINUX" <megaraidlinux.pdl@broadcom.com>,
	linux-scsi@vger.kernel.org,
	Kiran Kumar Kasturi <kiran-kumar.kasturi@broadcom.com>,
	Christopher Owens <christopher.owens@broadcom.com>
Subject: RE: [bug report] scsi: megaraid_sas: SAS3.5 Generic Megaraid Controllers Stream Detection and IO Coalescing
Date: Fri, 13 Jan 2017 14:52:22 -0500	[thread overview]
Message-ID: <e04dc3202bbdc189dfd8b4794dac0462@mail.gmail.com> (raw)
In-Reply-To: <20170112184934.GA12420@mwanda>

Hi Dan,

I will fix the static checker warning

Thanks
sasi

-----Original Message-----
From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
Sent: Thursday, January 12, 2017 1:50 PM
To: sasikumar.pc@broadcom.com
Cc: megaraidlinux.pdl@broadcom.com; linux-scsi@vger.kernel.org
Subject: [bug report] scsi: megaraid_sas: SAS3.5 Generic Megaraid
Controllers Stream Detection and IO Coalescing

Hello Sasikumar Chandrasekaran,

The patch fdd84e2514b0: "scsi: megaraid_sas: SAS3.5 Generic Megaraid
Controllers Stream Detection and IO Coalescing" from Jan 10, 2017, leads
to the following static checker warning:

	drivers/scsi/megaraid/megaraid_sas_fusion.c:1771
megasas_stream_detect()
	warn: inconsistent indenting

drivers/scsi/megaraid/megaraid_sas_fusion.c
  1747  static void megasas_stream_detect(struct megasas_instance
*instance,
  1748                                  struct megasas_cmd_fusion *cmd,
  1749                                  struct IO_REQUEST_INFO *io_info)
  1750  {
  1751          struct fusion_context *fusion = instance->ctrl_context;
  1752          u32 device_id = io_info->ldTgtId;
  1753          struct LD_STREAM_DETECT *current_ld_sd
  1754                  = fusion->stream_detect_by_ld[device_id];
  1755          u32 *track_stream = &current_ld_sd->mru_bit_map,
stream_num;
  1756          u32 shifted_values, unshifted_values;
  1757          u32 index_value_mask, shifted_values_mask;
  1758          int i;
  1759          bool is_read_ahead = false;
  1760          struct STREAM_DETECT *current_sd;
  1761          /* find possible stream */
  1762          for (i = 0; i < MAX_STREAMS_TRACKED; ++i) {
  1763                  stream_num =
  1764                  (*track_stream >> (i * BITS_PER_INDEX_STREAM)) &
  1765                          STREAM_MASK;
  1766                  current_sd =
&current_ld_sd->stream_track[stream_num];
  1767          /* if we found a stream, update the raid
  1768           *  context and also update the mruBitMap
  1769           */
  1770          /*      boundary condition */
  1771          if ((current_sd->next_seq_lba) &&

We're still inside the for loop.  This isn't indented far enough.

  1772                  (io_info->ldStartBlock >=
current_sd->next_seq_lba) &&
  1773                  (io_info->ldStartBlock <=
(current_sd->next_seq_lba+32)) &&
  1774                  (current_sd->is_read == io_info->isRead)) {
  1775
  1776                  if ((io_info->ldStartBlock !=
current_sd->next_seq_lba)
  1777                          && ((!io_info->isRead) ||
(!is_read_ahead)))
  1778                          /*
  1779                           * Once the API availible we need to
change this.
  1780                           * At this point we are not allowing any
gap
  1781                           */
  1782                          continue;
  1783
  1784
cmd->io_request->RaidContext.raid_context_g35.stream_detected = true;
  1785                  current_sd->next_seq_lba =
  1786                  io_info->ldStartBlock + io_info->numBlocks;
  1787                  /*
  1788                   *      update the mruBitMap LRU
  1789                   */


See also:

drivers/scsi/megaraid/megaraid_sas_base.c:5396 megasas_init_fw() warn:
inconsistent indenting
drivers/scsi/megaraid/megaraid_sas_fusion.c:4060 megasas_reset_fusion()
warn: inconsistent indenting

regards,
dan carpenter

      reply	other threads:[~2017-01-13 19:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12 18:49 [bug report] scsi: megaraid_sas: SAS3.5 Generic Megaraid Controllers Stream Detection and IO Coalescing Dan Carpenter
2017-01-13 19:52 ` Sasikumar PC [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=e04dc3202bbdc189dfd8b4794dac0462@mail.gmail.com \
    --to=sasikumar.pc@broadcom.com \
    --cc=christopher.owens@broadcom.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kiran-kumar.kasturi@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=megaraidlinux.pdl@broadcom.com \
    /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.