From: Dan Carpenter <dan.carpenter@oracle.com>
To: sumit.saxena@avagotech.com
Cc: megaraidlinux.pdl@broadcom.com, linux-scsi@vger.kernel.org
Subject: [bug report] megaraid_sas: Make PI enabled VD 8 byte DMA aligned
Date: Tue, 14 Feb 2017 19:23:41 +0300 [thread overview]
Message-ID: <20170214162341.GA3729@mwanda> (raw)
Hello sumit.saxena@avagotech.com,
The patch 0b48d12d0365: "megaraid_sas: Make PI enabled VD 8 byte DMA
aligned" from Oct 15, 2015, leads to the following static checker
warning:
drivers/scsi/megaraid/megaraid_sas_base.c:1784 megasas_set_dynamic_target_properties()
warn: if statement not indented
drivers/scsi/megaraid/megaraid_sas_base.c
1757 void megasas_set_dynamic_target_properties(struct scsi_device *sdev)
1758 {
1759 u16 pd_index = 0, ld;
1760 u32 device_id;
1761 struct megasas_instance *instance;
1762 struct fusion_context *fusion;
1763 struct MR_PRIV_DEVICE *mr_device_priv_data;
1764 struct MR_PD_CFG_SEQ_NUM_SYNC *pd_sync;
1765 struct MR_LD_RAID *raid;
1766 struct MR_DRV_RAID_MAP_ALL *local_map_ptr;
1767
1768 instance = megasas_lookup_instance(sdev->host->host_no);
1769 fusion = instance->ctrl_context;
1770 mr_device_priv_data = sdev->hostdata;
1771
1772 if (!fusion || !mr_device_priv_data)
1773 return;
1774
1775 if (MEGASAS_IS_LOGICAL(sdev)) {
1776 device_id = ((sdev->channel % 2) * MEGASAS_MAX_DEV_PER_CHANNEL)
1777 + sdev->id;
1778 local_map_ptr = fusion->ld_drv_map[(instance->map_id & 1)];
1779 ld = MR_TargetIdToLdGet(device_id, local_map_ptr);
1780 if (ld >= instance->fw_supported_vd_count)
1781 return;
1782 raid = MR_LdRaidGet(ld, local_map_ptr);
1783
1784 if (raid->capability.ldPiMode == MR_PROT_INFO_TYPE_CONTROLLER)
1785 blk_queue_update_dma_alignment(sdev->request_queue, 0x7);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1786
1787 mr_device_priv_data->is_tm_capable =
1788 raid->capability.tmCapable;
1789 } else if (instance->use_seqnum_jbod_fp) {
1790 pd_index = (sdev->channel * MEGASAS_MAX_DEV_PER_CHANNEL) +
1791 sdev->id;
1792 pd_sync = (void *)fusion->pd_seq_sync
1793 [(instance->pd_seq_map_id - 1) & 1];
1794 mr_device_priv_data->is_tm_capable =
1795 pd_sync->seq[pd_index].capability.tmCapable;
1796 }
1797 }
regards,
dan carpenter
next reply other threads:[~2017-02-14 16:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-14 16:23 Dan Carpenter [this message]
2017-02-15 5:53 ` [bug report] megaraid_sas: Make PI enabled VD 8 byte DMA aligned Sumit Saxena
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=20170214162341.GA3729@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-scsi@vger.kernel.org \
--cc=megaraidlinux.pdl@broadcom.com \
--cc=sumit.saxena@avagotech.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.