From patchwork Wed Feb 13 16:08:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 158236 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp239887jaa; Wed, 13 Feb 2019 08:08:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IZz2Qw96VP4/34JX1+D7mzTEdqBUTu9EMRbFosd2fsak8YqYEq8h0rDzLActvWkADo0axPD X-Received: by 2002:a63:105a:: with SMTP id 26mr1102547pgq.184.1550074112701; Wed, 13 Feb 2019 08:08:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550074112; cv=none; d=google.com; s=arc-20160816; b=JHPFAmbKJ/8cf4e/BoNqha8l0JYZJryI1SdjQKTgICoEdy6UutU6uGHyAwqxR/OHYQ mUsjfGQ6gcU9Qsp2hTdNC36YcGaHXRiheWl6OUxhy2Fk8ojZOaBZozOazYlOPTIF8yxA C/5UgVo2pBJxNiqYqhs5moUlD7BP6Plt6qL+l9iPKjIQM57zb8uJStsrK89CqYizun+d CwjTl0Og6tPNGqJ60Ah8LFd8CkHt6yMTgZr0021OxP3DkIdOJ0sxTRh2+rL7t8r79VC0 gw7SFkU5RCAB+o2kBqB4C3X5zEWyWWnUY5md5414+OiMpguvjDaCR16qtstriZOVRhst nkvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=XnbXfZW5UqKnm7T4Tfw4mA9FpQDbLcwwfMQTvEh1Vao=; b=fRaHizk9TD9S+7wtxfQwQPDKP9ZPxqJpUC09yY0GeBv0p5BnYu0NtXMdB0+pZ0A1qv BM9nVa4qFe46eoStNJa/nGEf9eUFXG6wFAPAEjqqBMdmMCucG4qFml9WnkLoRKVYNGu4 ux9zNgsrAQec4Ox7R5Y+hSdOCbqu9QELDabXFK05NfsUgvYJkm4VSU86BujUGEZWslyP G+Kx2n4+eFhF/CkqS9SN/5fj6410tWOIdFiMxTt7Fp7CDEDmRGNxJ6o+fURhTFIJgWLk JF88HasERdfR6fhnqN2kOD/cYCHqpRPt1B9Vy3N3nxPGWukHTTQklMmPhiiaTUigzOGV jftw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h72si7734567pfd.115.2019.02.13.08.08.32; Wed, 13 Feb 2019 08:08:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403764AbfBMQIc (ORCPT + 1 other); Wed, 13 Feb 2019 11:08:32 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:41966 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733262AbfBMQIb (ORCPT ); Wed, 13 Feb 2019 11:08:31 -0500 Received: by mail-ot1-f67.google.com with SMTP id u16so4943264otk.8; Wed, 13 Feb 2019 08:08:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XnbXfZW5UqKnm7T4Tfw4mA9FpQDbLcwwfMQTvEh1Vao=; b=B+x6k6doXlwh1L0mAbuKx+QBrTDegv1gkhlgXKui6ocZPeTxXq5vsYDH0I2Ig67RWZ LBBJnB9bizuYRH9akzs5tPTJa9lP+AMEjB7nJmEll5Fw8g7v8nxzP1gS4I7f2WKPvVKA EPHWhezBfkj6gtG1nZsRcFV7rkVkEnTfAjZ5GTuJ8XHe+C8LKgmngZG1SBPANbBn8H37 ZlXlgeannb7uN0+dLJVraGQUugBpRD7T3DwJAQ7WL6uMMgFUP40hcoSvPIS61pfC72w4 Gb3TMuXOy4proZ0eHsNNhvkRXs3H0jQITw/983WhWcHef/JeaBPZQ93XPTwocKhFuqXq xKjA== X-Gm-Message-State: AHQUAuYGd214GGY2DfJanucKiYszhvr/YiYdTCquSd0tBUhQNVTAWz3O lsRADkefLAUmLuMzZ+NQgw== X-Received: by 2002:aca:c5d5:: with SMTP id v204mr671477oif.104.1550074111020; Wed, 13 Feb 2019 08:08:31 -0800 (PST) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id m5sm4022129oih.16.2019.02.13.08.08.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 08:08:30 -0800 (PST) From: Rob Herring To: "Martin K. Petersen" Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, "James E.J. Bottomley" , linux-scsi@vger.kernel.org Subject: [PATCH] scsi: qlogicpti: Use of_node_name_eq for node name comparisons Date: Wed, 13 Feb 2019 10:08:29 -0600 Message-Id: <20190213160829.3923-1-robh@kernel.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. As prom_name is not used for anything else, remove it. Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Rob Herring --- drivers/scsi/qlogicpti.c | 3 +-- drivers/scsi/qlogicpti.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) -- 2.19.1 diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index e35ce762d454..0e22512bd3e4 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c @@ -1314,8 +1314,7 @@ static int qpti_sbus_probe(struct platform_device *op) qpti->qhost = host; qpti->op = op; qpti->qpti_id = nqptis; - strcpy(qpti->prom_name, op->dev.of_node->name); - qpti->is_pti = strcmp(qpti->prom_name, "QLGC,isp"); + qpti->is_pti = !of_node_name_eq(op->dev.of_node, "QLGC,isp"); if (qpti_map_regs(qpti) < 0) goto fail_unlink; diff --git a/drivers/scsi/qlogicpti.h b/drivers/scsi/qlogicpti.h index 884ad72ade57..2b6374e08a7d 100644 --- a/drivers/scsi/qlogicpti.h +++ b/drivers/scsi/qlogicpti.h @@ -364,7 +364,6 @@ struct qlogicpti { int qpti_id; int scsi_id; int prom_node; - char prom_name[64]; int irq; char differential, ultra, clock; unsigned char bursts; @@ -379,7 +378,7 @@ struct qlogicpti { #define SREG_IMASK 0x0c /* Interrupt level */ #define SREG_SPMASK 0x03 /* Mask for switch pack */ unsigned char swsreg; - unsigned int + unsigned int gotirq : 1, /* this instance got an irq */ is_pti : 1; /* Non-zero if this is a PTI board. */ };