From patchwork Wed Dec 5 19:50:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 152959 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp9696341ljp; Wed, 5 Dec 2018 11:52:26 -0800 (PST) X-Google-Smtp-Source: AFSGD/VW2Rj1Yg5loNDXxIeyWVRTG20mET8DwBRzYgf+wisBGd7aGe9jqU6WFFKqIzWiMlhpFX9k X-Received: by 2002:a63:990a:: with SMTP id d10mr20574010pge.279.1544039546574; Wed, 05 Dec 2018 11:52:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544039546; cv=none; d=google.com; s=arc-20160816; b=eJ6kDaodju7lHD+bcVLkn+jJ32HoiZPUzy+KVsmMrxPRHGjcscz+OBABsR0MCsxlaw Sg0zKF0pluRH1mJzToRGeUc7rcs3Sta8vU0eASPdDZ9qpgfLzNJLaiYcAM3G7RzB8S3Z pQfpt1RqlXtSyyI8rNuEPCb3G4yszLhSwSqjUG/gzvD8ELd+pm68fWXb6z6K7QhpLGF2 ynclQjBs6UXnOzi7R6n/ePGzwaLZ/EyYV0wZuMFzXUbsHwNIUCRP7SQPPMweT/Q9/b2O bSs1Fqm3dTa436T5zQgOvXjHas0u8sIZTQYrrgpuMHckotiT6noNBR/hISeq2ndSEFEe ahSQ== 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=P6eIG0/5LHUZfO4VXf+cpIcy6s1WeTN8+4j6CIdmGr8=; b=tAAKoOtmgmSB6+Zb9R8NwsPM2VSKQt9aHWLKp+i21FJVP8eCJn175aHlBae4kYf7r6 G5yfWPicn4A8ICfbPlKnkhqCUZeMM830wtbrRQYzAVmwCEXtcmVC8ykbeYix09kC541K vlTUUXjYlW/J6oe9vboV31xaSxcIC+ui7fiU2Bz/ZEMC7q6o+ZBSj2v31gXbVFSBYXop ZtEJ7/kQoVqtU+BNRmyVP0XDFsb+gHdz7c+xcOC9SSrHrhNEwcAKSl3fVDpZIM6RsYgd DJSgW5XBxNABSX8jIAPHvUIaFm+ZbpVdSPpSvF/r4OprL2B2j4hrsBZKisAJRKr6l6JM JNcw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 x3si19031138pgf.453.2018.12.05.11.52.26; Wed, 05 Dec 2018 11:52:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1728979AbeLETwY (ORCPT + 31 others); Wed, 5 Dec 2018 14:52:24 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:33916 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728814AbeLETvU (ORCPT ); Wed, 5 Dec 2018 14:51:20 -0500 Received: by mail-oi1-f196.google.com with SMTP id h25so18672694oig.1; Wed, 05 Dec 2018 11:51:20 -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=P6eIG0/5LHUZfO4VXf+cpIcy6s1WeTN8+4j6CIdmGr8=; b=GTkUikNvdSd+pnZclrNqPR+iFT/iria7kAt7VMmQ+PIMKltr2maZPp8t7RH3TFFIts QO0i/gVDywlHz1t2Jz8AlSa6B3D1zRtxZB0XRCFeaSORJnMkFqNbTO3jotWeGAYySB2K 2PZhdFUJUPNL44BigfAhFAXlgjaWP01FxEP5NUMYEaiTiyNfy5xv8x+J/PGMPEd+ojLk wtGwFplrhmBvsS9KbZOi+dtfmoETn8X3HOwfgITI8vA1Z5IJS+jggTDMJ3TAjgujn2fT QHGoEmd8sL8VDwq1CxQuJC7dvi2DTKqPEPPLWltzSo3q2mkb3Mqtbzpe2aINxSaicr9+ ioeA== X-Gm-Message-State: AA+aEWbrZvoMCf+HaefUU1ddjOBy1m6RAAHvsh0jLL/Hth3jy5sVU8P4 8QDTqg1Wr5g0D7XE+yEuWAxwaX4= X-Received: by 2002:aca:d09d:: with SMTP id j29mr14590108oiy.262.1544039479527; Wed, 05 Dec 2018 11:51:19 -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 k13sm25759879otj.19.2018.12.05.11.51.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 11:51:18 -0800 (PST) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mark Brown , linux-spi@vger.kernel.org Subject: [PATCH] SPI: Use of_node_name_eq for node name comparisons Date: Wed, 5 Dec 2018 13:50:41 -0600 Message-Id: <20181205195050.4759-25-robh@kernel.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. Cc: Mark Brown Cc: linux-spi@vger.kernel.org Signed-off-by: Rob Herring --- drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.19.1 diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 6ca59406b0b7..d27b6b0dee43 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1644,7 +1644,7 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi, } if (spi_controller_is_slave(ctlr)) { - if (strcmp(nc->name, "slave")) { + if (!of_node_name_eq(nc, "slave")) { dev_err(&ctlr->dev, "%pOF is not called 'slave'\n", nc); return -EINVAL;