Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4114088ybc; Thu, 14 Nov 2019 22:09:23 -0800 (PST) X-Google-Smtp-Source: APXvYqwvWep8f3B99AXhXUxxbR+iwJx17YXBmr2GrPSOgN2bYv1TcS+mYDIAHD+ZAQoQbbHWRQE6 X-Received: by 2002:a17:906:d793:: with SMTP id pj19mr11324608ejb.303.1573798162858; Thu, 14 Nov 2019 22:09:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573798162; cv=none; d=google.com; s=arc-20160816; b=wLl/CDeAOPR55dZ85Z9cnMPRdssVbJtNTekIHpoAmakmj/L0LG0YrwvnmsUIpYHdXk lAX7qeVTR9xo4QE68LYkKLVg/ldHN1KiZ1HfGaYmDNpuOQ374d7k7WXSjXt0NBZ5/526 xXrxk78JbDC0g6bYXAXUJmI/kOf6SmV4Fnopr2y3dK7se1J4ciOMVCeUEr4uRRpBJrFe /eVXYcDY1ZVSn3gOMKeHBff/5w4NEN+ww1oA234A/HvqRAPxCLeY8kt+/K+HA2qZMp5F 3aKhSczal4T/4mACs/Zbu7P+Gf6uZiIj5tR1Z+f4F2K/gTbCHimsvIzly9m+qHzzAago 9HZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization :content-disposition:mime-version:mail-followup-to:message-id :subject:cc:to:from:date; bh=J/Fso++4i0IazW4aPwEcATKOIRw22vhN1qCTmhVaNIs=; b=LiDzfGB9K+3jhJc53EcNtEcbB5FWLDB6vk9ewS7c/ZK4rqTmo7A1aRvB4EvQKw7cMj dXgCUjnrOWaoLI8W8wGdJIMVt2XyF1QoSl+CvhePBQQEmY9JfxfDyKSdRt1X64Ng+4nI RLe239oY8dY8H0XPklY5dZOWs2J3o86/To4rhpjEzYMgefS1ZfmYcYRAN+zF7yx8Rwte 2v6kxYYdjbQP88ykSYf/m+CObJaJ5RHfzF0TIuhLcH2lK58g8QY74DsaUoS0YPe+Hivh UoiCyiq+YF+38XcRV5yY4kbUS5bO7+M5M/ifuiQLC+NhVqKaMd377ZLdPOTdC0uDycTd FevQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q12si5004398ejn.435.2019.11.14.22.08.58; Thu, 14 Nov 2019 22:09:22 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727274AbfKOGHO (ORCPT + 99 others); Fri, 15 Nov 2019 01:07:14 -0500 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]:49926 "EHLO smtp2207-205.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727208AbfKOGHN (ORCPT ); Fri, 15 Nov 2019 01:07:13 -0500 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.08837032|-1;CH=green;DM=CONTINUE|CONTINUE|true|0.0377916-0.00102263-0.961186;FP=0|0|0|0|0|-1|-1|-1;HT=e02c03301;MF=fuyao@allwinnertech.com;NM=1;PH=DS;RN=4;RT=4;SR=0;TI=SMTPD_---.G-yTRwf_1573798030; Received: from localhost(mailfrom:fuyao@allwinnertech.com fp:SMTPD_---.G-yTRwf_1573798030) by smtp.aliyun-inc.com(10.194.99.21); Fri, 15 Nov 2019 14:07:10 +0800 Date: Fri, 15 Nov 2019 14:06:04 +0800 From: fuyao To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Cc: =?utf-8?B?6bqm6ZSu5qif?= , =?utf-8?B?5p2O6Z2ZcHN3?= Subject: [power supply]:missing definition without config Message-ID: <20191115060604.GE17312@AExdroid03> Mail-Followup-To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, =?utf-8?B?6bqm6ZSu5qif?= , =?utf-8?B?5p2O6Z2ZcHN3?= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: fuyao_love_xxt.Allwinnertech.Technology User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org linux-pm: hi, walk around the power_supply.h file. call power_supply_get_by_name without the CONFIG_POWER_SUPPLY, cause error. if we should use: #ifdef CONFIG_POWER_SUPPLY extern extern struct power_supply *power_supply_get_by_name(const char *name); #else static inline struct power_supply * power_supply_get_by_name(const char *name) {return NULL;} #endif