From patchwork Sun Nov 25 17:37:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1002831 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=konsulko.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 432y192D6qz9s0t for ; Mon, 26 Nov 2018 04:37:29 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 110C9C2208D; Sun, 25 Nov 2018 17:37:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 88688C22012; Sun, 25 Nov 2018 17:37:20 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id ECAF8C22012; Sun, 25 Nov 2018 17:37:18 +0000 (UTC) Received: from mail-yw1-f65.google.com (mail-yw1-f65.google.com [209.85.161.65]) by lists.denx.de (Postfix) with ESMTPS id 63C8AC2200E for ; Sun, 25 Nov 2018 17:37:18 +0000 (UTC) Received: by mail-yw1-f65.google.com with SMTP id i20so6628665ywc.5 for ; Sun, 25 Nov 2018 09:37:18 -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; bh=yt4cOcSpwyfgJPj8kRCPyeixJf4a2lJZvAfrPYo/ZL8=; b=XlVMAq410M19KMjPGyHts2vgWQ/J1fWE69TH0hpoyxzX29jxeO5e4/QQkCMVXQQQPJ UySNh8Ohti4+6OWqtSn5O5DZmvtmCSOhcySHRPH2JQZgRFb9rILJYrEiK6g1IvWl3glr rIm0tHyZgCw0DZeX2X3nqPxaIxmehPRCODb16IabF3dNWTVfUxvmuh3lYfjXQNKQesMn r/Dtpxig9BS6NzbegjpvYzlqFlgJYDmdNub+QqHBksQjR241zix9O/1kZW5Z4dwxUbq8 JxwbKC/bCLFwMJuvnMhpjt+iNu56EPBdqky0hidfZMeiG6sKTiLhS5TN/XCBLTdBLdiq EDCA== X-Gm-Message-State: AGRZ1gLA7yLba1ptIIf2ryEJpCLDsIoTurl8ifnutRhOkCxi/55+A/LL slCHD97Qv1VeNnBreacDQfrQ5L8= X-Google-Smtp-Source: AJdET5fhP+6zjD12Q4Tp7jw4iDb6KyvZ/j8EX8n1pQYIXjkPUT/MSZfl6eScnz2mrML4saw4xkdzBg== X-Received: by 2002:a81:9291:: with SMTP id j139mr25166755ywg.35.1543167436799; Sun, 25 Nov 2018 09:37:16 -0800 (PST) Received: from bill-the-cat.ec.rr.com (cpe-65-184-133-47.ec.res.rr.com. [65.184.133.47]) by smtp.gmail.com with ESMTPSA id c74-v6sm15197760ywc.90.2018.11.25.09.37.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Nov 2018 09:37:15 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Date: Sun, 25 Nov 2018 12:37:12 -0500 Message-Id: <1543167432-11884-1-git-send-email-trini@konsulko.com> X-Mailer: git-send-email 2.7.4 Subject: [U-Boot] [PATCH] blk: Rework guard around part_init call X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The function part_init() will only be built when we have both CONFIG_PARTITIONS and CONFIG_HAVE_BLOCK_DEVICE set. Protect the call to this function with both of these tests now. Cc: Simon Glass Signed-off-by: Tom Rini Reviewed-by: Simon Glass --- drivers/block/blk-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index 65a766e586d6..baaf431e5e0c 100644 --- a/drivers/block/blk-uclass.c +++ b/drivers/block/blk-uclass.c @@ -639,7 +639,7 @@ int blk_unbind_all(int if_type) static int blk_post_probe(struct udevice *dev) { -#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBDISK_SUPPORT) +#if defined(CONFIG_PARTITIONS) && defined(CONFIG_HAVE_BLOCK_DEVICE) struct blk_desc *desc = dev_get_uclass_platdata(dev); part_init(desc);