Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp917213imm; Wed, 8 Aug 2018 07:52:12 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxH62Bavt8UIpG01cmPSTbmwiVdsuRk+q5AjLEiySnm0dQQ+viig+BLXipWsvzRYI0w2YXK X-Received: by 2002:a62:89d8:: with SMTP id n85-v6mr3285964pfk.83.1533739932591; Wed, 08 Aug 2018 07:52:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533739932; cv=none; d=google.com; s=arc-20160816; b=zOHQjK2j8NRO94Y6KyWcXfUiCzCiwN1lT7FFWpDy/58f1ng6L4kyw5fkX5SgpGopSd 6mr0qplzZmcGZQW4Auc4rBzB7QFxcJqcdbQ/y9NA3Bv7n243sLtik1+1pbcVHQsYxdk1 UsmcohLyt4fvTMXqEqOB+gCv0+UI+7+aTr1dM+wPXTD9OiswPoTmKYG0M9d1M+kxj+s3 BW7/ysyGUteub8sDwwhlDiewZ0N3b4Mtm8c4NvIgURGcu8T+gl6sXJEJsfHp3Axv1x4T 3GJUykkPNyq1n4ixaNWNyAIBXC/1fNUD8L3isWHCGKz6d2L20FrYuxFJEIwro7uFaOfL 4SUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=+fylNTi5bV/DGFZ7AukNnDfwVutWQ/BlHQxVLJ9/vF8=; b=JL/O1t1BQC6i+8kFznHjGvMAu8e/dK9IgQOFP5Oc6CudAOOAx7DCSh27pcxT8JL+MR wQHDgXtAmbKvtX7QhVri5f7XipDXPnzyayO8slKoTSyKQppUsj5sm9FQaTS31Q3cUMBh 9T6bOVTG51qxs/QGOys3UMTm8BOT032vj9yKA5ckKkGgaKLtot7CPaJItE6Pm8ksmB8F zwsU7FDOxvZCHRW1u/Pi3svBdSSVEvJrbuXxXA28dJGSAYxJSH737ODUnxOndY3xBFz8 JdSC4UiYNH2TjkVA+vWl8W7fid9vivrgWdCm3GA2L+eKeYYtuap4Rv91eIk8wd0hsjBj 5INw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Pv6eXifO; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z17-v6si4624636pgk.183.2018.08.08.07.51.57; Wed, 08 Aug 2018 07:52:12 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Pv6eXifO; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727635AbeHHRKg (ORCPT + 99 others); Wed, 8 Aug 2018 13:10:36 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:43704 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727146AbeHHRKg (ORCPT ); Wed, 8 Aug 2018 13:10:36 -0400 Received: by mail-pf1-f194.google.com with SMTP id j26-v6so1249097pfi.10; Wed, 08 Aug 2018 07:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=+fylNTi5bV/DGFZ7AukNnDfwVutWQ/BlHQxVLJ9/vF8=; b=Pv6eXifOUJCF9UnapaP1yC6KPsuC336mb9LDrxALwe/KWKQTyEjNVr/zZDpzsPR6SR XSOeH3y3bHZnfWP3H8tPKT5tTxdBY55uQXRVkHA79vrZwBwANglmQ4b04FJNNPYs2tnB SRc/yHvLmueq+/s0hjh/2HC4fuyAwoVPskJkaU84VzWcnMWu8zkUD9qx2QIi94Pp/Eky LtpfOfs62keZkcbOlRuqK1Df+S4dEpkpYAb3epRDPMeAOfyEEJF1M/lAEKnSf48j326b Up9LqpaliSf21u1n9c5rPlSYMcEG1G86yT15UhJHsE9ZqhXwwMhplX8BDxhaMtruAksk 5njQ== 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; bh=+fylNTi5bV/DGFZ7AukNnDfwVutWQ/BlHQxVLJ9/vF8=; b=a3ZbDgj5yE4of7RkxN+5YcL7579pxMxM/HWvF+5x4I+53TxBtSoKX10iVfKkySGSXq DWNExIsZPN45eI8K5chbguJ8j/8vmaOmYHMwacB+wKhCMlJ0DSzqGJBmjUTSDSQh1zir +thg/7VO0bFpc//m7SkgYNm09U4p7jQ7PG+YHD3byWdPNUk58oxQB1yINfNHVqJjlUIH BDrLUnYNpGDp9MsS+racG9k9S872UQOze/DdNlPb2ft0p4Y638WBLnnn6L3V23vN763y WUP1yJGiwSlal2jihHOwaEcZD6OWVCUhBPV0ZFvFZ4o1WYPTGTcn6ocbqO5TgO6DxDWr 7UrQ== X-Gm-Message-State: AOUpUlEEgHOW0746LvAUGzD/w9dGiHqlkWNZtv+2sLequ4cXJjzas54L y1VatCwCiq5P9wnmUEinKg0= X-Received: by 2002:a62:c4c3:: with SMTP id h64-v6mr3285220pfk.39.1533739835634; Wed, 08 Aug 2018 07:50:35 -0700 (PDT) Received: from 192.168.190.131 ([45.62.52.60]) by smtp.gmail.com with ESMTPSA id x2-v6sm8220854pfi.166.2018.08.08.07.50.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Aug 2018 07:50:35 -0700 (PDT) From: Ocean He To: dan.j.williams@intel.com, ross.zwisler@linux.intel.com, vishal.l.verma@intel.com, dave.jiang@intel.com, rjw@rjwysocki.net, lenb@kernel.org Cc: linux-nvdimm@lists.01.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Ocean He Subject: [PATCH] ACPI: nfit: check dcr immediately following its assignment codes Date: Wed, 8 Aug 2018 10:50:21 -0400 Message-Id: <1533739821-9864-1-git-send-email-oceanhehy@gmail.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ocean He In commit 6697b2cf69d43632 ("nfit: fix multi-interface dimm handling, acpi6.1 compatibility"), the check codes of dcr were just following its assignment codes. But they were separated by commit ad9ac5e1957531a8 ("nfit: always associate flush hints"). Just change the check codes back to original position, without function change. Signed-off-by: Ocean He --- drivers/acpi/nfit/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 7c47900..c9e4c9a 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -1078,6 +1078,12 @@ static int __nfit_mem_init(struct acpi_nfit_desc *acpi_desc, break; } + if (dcr && !nfit_mem->dcr) { + dev_err(acpi_desc->dev, "SPA %d missing DCR %d\n", + spa->range_index, dcr); + return -ENODEV; + } + list_for_each_entry(nfit_flush, &acpi_desc->flushes, list) { struct acpi_nfit_flush_address *flush; u16 i; @@ -1101,12 +1107,6 @@ static int __nfit_mem_init(struct acpi_nfit_desc *acpi_desc, break; } - if (dcr && !nfit_mem->dcr) { - dev_err(acpi_desc->dev, "SPA %d missing DCR %d\n", - spa->range_index, dcr); - return -ENODEV; - } - if (type == NFIT_SPA_DCR) { struct nfit_idt *nfit_idt; u16 idt_idx; -- 1.8.3.1