Skip to content

Commit

Permalink
[SCSI] be2iscsi: remove host and session casts
Browse files Browse the repository at this point in the history
iscsi_session_to_shost is a macro around dev_to_shost which returns a
Scsi_Host so there is no need to cast.

iscsi_session_to_shost is a macro around shost_priv which
returns a void pointer so no need to cast.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Mike Christie authored and James Bottomley committed Aug 27, 2011
1 parent f27fb2e commit 3093b04
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/scsi/be2iscsi/be_iscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,8 @@ int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
{
struct iscsi_conn *conn = cls_conn->dd_data;
struct beiscsi_conn *beiscsi_conn = conn->dd_data;
struct Scsi_Host *shost =
(struct Scsi_Host *)iscsi_session_to_shost(cls_session);
struct beiscsi_hba *phba = (struct beiscsi_hba *)iscsi_host_priv(shost);
struct Scsi_Host *shost = iscsi_session_to_shost(cls_session);
struct beiscsi_hba *phba = iscsi_host_priv(shost);
struct beiscsi_endpoint *beiscsi_ep;
struct iscsi_endpoint *ep;

Expand Down Expand Up @@ -290,7 +289,7 @@ int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
int beiscsi_get_host_param(struct Scsi_Host *shost,
enum iscsi_host_param param, char *buf)
{
struct beiscsi_hba *phba = (struct beiscsi_hba *)iscsi_host_priv(shost);
struct beiscsi_hba *phba = iscsi_host_priv(shost);
int status = 0;

SE_DEBUG(DBG_LVL_8, "In beiscsi_get_host_param, param= %d\n", param);
Expand Down

0 comments on commit 3093b04

Please sign in to comment.