Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6535881imu; Wed, 14 Nov 2018 03:08:34 -0800 (PST) X-Google-Smtp-Source: AJdET5eC6l3USIaujKSJymuVUz1Cm8lw2j1c6c8YcJLUXXRkxcn6rRkXADypMNS4T10MdVdN1wrI X-Received: by 2002:a63:e655:: with SMTP id p21mr1333382pgj.70.1542193713981; Wed, 14 Nov 2018 03:08:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542193713; cv=none; d=google.com; s=arc-20160816; b=i7OVevOxPcPaUyVN658AAfLZeF/XcMJ2KA+SAjJ5fOWzPkkWrRTnybmqplJdoxJyks iViBu60HOACRqBUtcffrrL5zW2DObP8PtI7VSO3T9mYmJ9hJ3s3cw7/MexZ+kfgrRVoI PzA0PV9WsJ0KIF5X1C3WaMQ105b4qNW45gf6RKOE854e+++VVX2sqT6XLgwfGw6ueYEX 9eFE8xqnWXyXNeLJ/kuPIEaVICWO/AsNUk9G6j9gWdyswcryMYfx70HLPJYNAn0yLJ0c dU9ytzmIo2CD23IeXvn46kftnw3lPWbUbo057UGqyE+kHpWgSK8lQdCgxNe6qvYQTjYQ aJUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :in-reply-to:subject:cc:to:user-agent:organization:from:date :message-id:content-transfer-encoding:mime-version:dkim-signature :dkim-filter; bh=Il+aQhdWNocSNhPIy5HmaM4WmdtOUjg6ldwpBDmwWMY=; b=Ia6CtCTxI3qLO789GxYW/ZW87b/Qunh6Y1YYL91+2bHHS958Pb5wvt7IIzEw6MKOOs EL84yKGOf4njKGwz9zFSpRdxRgjJPO1u9TscXf5bLE+8T6f8mv2k9YJbnRs1sCVpBFIq JeipCroYJT5ZEUoyikBEDJv2XP6vRk6exzUDT1n/429/x8C/8LGzBW5iJxTy5lzLbkH4 xmd42DAm5TNd63KF7FnRyPt5Mwj3sPj/ojBA+sQPeCXkJX6UVKj4u1MAyn+QXMM6AYQ/ klpyxKdyfqlE5B8NLx5SFsSmdnhUUNBlOBvAI18yly48rRPg32vLFc3HCUEkUDHyXxNl /QwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=XimgHnXR; 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=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i186-v6si14294710pfg.265.2018.11.14.03.08.18; Wed, 14 Nov 2018 03:08:33 -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; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=XimgHnXR; 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=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732504AbeKNVIu (ORCPT + 99 others); Wed, 14 Nov 2018 16:08:50 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:56454 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727649AbeKNVIu (ORCPT ); Wed, 14 Nov 2018 16:08:50 -0500 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20181114110555epoutp017d75b5280875ba98c9b3e842166e455d~m_N4cPTi60509805098epoutp01t; Wed, 14 Nov 2018 11:05:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20181114110555epoutp017d75b5280875ba98c9b3e842166e455d~m_N4cPTi60509805098epoutp01t DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1542193555; bh=Il+aQhdWNocSNhPIy5HmaM4WmdtOUjg6ldwpBDmwWMY=; h=Date:From:To:Cc:Subject:In-reply-to:References:From; b=XimgHnXR52Cu/VN/B7lcB7tRxSV1Wb5TZbeRIRa7U6/spnvlmLiiz/O3A3ORIOtx2 +diiWFGZA3+brUVBr9y9/KiRXe+5EMx2uiQPMCHtuIp7I3OLrKkr75lpv+YQ9QLjLE ZDOHt0/0XcYv00Qn7rwOZJlQEzjIqKewngJ7RcvE= Received: from epsmges1p3.samsung.com (unknown [182.195.40.152]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20181114110552epcas1p4056a74f1089ce8b3c35e8c789d608c30~m_N2EwHlu0352303523epcas1p4K; Wed, 14 Nov 2018 11:05:52 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id CD.05.04072.0910CEB5; Wed, 14 Nov 2018 20:05:52 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20181114110551epcas1p4323d98bd891179a70454448ab7fd6978~m_N0_5kd70350703507epcas1p41; Wed, 14 Nov 2018 11:05:51 +0000 (GMT) X-AuditID: b6c32a37-86fff70000000fe8-70-5bec0190f757 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 1D.F9.03701.F810CEB5; Wed, 14 Nov 2018 20:05:51 +0900 (KST) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset="utf-8" Received: from [10.113.63.77] by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PI600KHXK5QMA60@mmp2.samsung.com>; Wed, 14 Nov 2018 20:05:51 +0900 (KST) Message-id: <5BEC018E.8020102@samsung.com> Date: Wed, 14 Nov 2018 20:05:50 +0900 From: Chanwoo Choi Organization: Samsung Electronics User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: Andy Shevchenko Cc: MyungJoo Ham , USB , Felipe Balbi , Guenter Roeck , "Krogerus, Heikki" , rogerq@ti.com, Linux PM , "Rafael J. Wysocki" , Sebastian Reichel , Linux OMAP Mailing List , Darren Hart , Platform Driver , Greg Kroah-Hartman , Linux Kernel Mailing List , Chen-Yu Tsai , Hans de Goede Subject: Re: [PATCH v1 2/5] extcon: Return -EPROBE_DEFER when extcon device is not found In-reply-to: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrHJsWRmVeSWpSXmKPExsWy7bCmnu4ExjfRBv+a1S1eTjjMaHGs7Qm7 RddCA4vmxevZLN4cn85k0bV6J4vF5V1z2CxmL+lnsfjce4TRYtGyVmaLJwvPMFncblzBZrF6 zwtmi7lfpjJb9DzSsji9u8Ti56HzTA6CHhserWb12DnrLrvH5hVaHptWdbJ5zDsZ6LF/7hp2 j/f7rrJ57PzewO7Rt2UVo8fxG9uZPD5vkgvgjsq2yUhNTEktUkjNS85PycxLt1XyDo53jjc1 MzDUNbS0MFdSyEvMTbVVcvEJ0HXLzAH6SEmhLDGnFCgUkFhcrKRvZ1OUX1qSqpCRX1xiq5Ra kJJTYFmgV5yYW1yal66XnJ9rZWhgYGQKVJiQnfFndQtLQZ9oxduuY+wNjB2CXYycHBICJhJ7 Pi5l6WLk4hAS2MEocX/+b3YI5zujxNsl39lhqrb96GcFsYUENjBK3HmiBWLzCghK/Jh8D6ib g4NZQF7iyKVskDCzgKbEiy+ToIbeZZTY9+4JM0S9lsTyzk1sIDaLgKrE9tu/weJsQPH9L26A xfkFFCWu/njMCGKLCkRI7Jz/DegGdg4RAX2J/WUQ42eySrx65g5iCwtESZy7uAesmlMgWOLp kgdg50sI7GOXmNr2ixXifBeJ3yteQN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3PbfYqMAwL7Vcrzgxt7g0L10vOT93EyMw9rYd 1urbwXh/SfwhRgEORiUeXovbr6KFWBPLiitzDzFKcDArifD6R7+OFuJNSaysSi3Kjy8qzUkt PsQozcGiJM57O+9YpJBAemJJanZqakFqEUyWiYNTqoFRhzH4cuadf6G7zntzrnv9fGHmKTmp NT0ve84cyudbuc/y9PKKC//nbnPQrDhye8kq9dnxArHrGWdZGodclFj8au/qy7Mz36/0ClYt SzkbO1do2uI3qe9WSBXc/9f3ISk1/8nniRGzmc4tMv76r+/Lstq2Y09n2FzfGqJ843nBA15F TpmkK/rHNZRYijMSDbWYi4oTAT4eQrG5AgAA X-CMS-MailID: 20181114110551epcas1p4323d98bd891179a70454448ab7fd6978 X-Msg-Generator: CA CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20181110181155epcas2p1ac9bffb2dc7dd6337db5c37f8a87bd5e References: <20181110181101.24557-1-andriy.shevchenko@linux.intel.com> <20181110181101.24557-2-andriy.shevchenko@linux.intel.com> <5BE8C821.5080002@samsung.com> <5BEB63C3.1020504@samsung.com> <5BEBE741.6050101@samsung.com> <20181114093652.GK10650@smile.fi.intel.com> <5BEBEF7C.7060003@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018년 11월 14일 19:20, Andy Shevchenko wrote: > On Wed, Nov 14, 2018 at 11:48 AM Chanwoo Choi wrote: >> >> On 2018년 11월 14일 18:36, Andy Shevchenko wrote: >>> On Wed, Nov 14, 2018 at 06:13:37PM +0900, Chanwoo Choi wrote: >>>> On 2018년 11월 14일 17:35, Andy Shevchenko wrote: >>>>> On Wed, Nov 14, 2018 at 1:53 AM Chanwoo Choi wrote: >>>>> >>>>>> I was thinking about again to change from NULL to EPROBE_DEFER. >>>>>> >>>>>> extcon_get_extcon_dev() function was almost called in the probe function. >>>>>> But, this function might be called on other position instead of probe. >>>>> >>>>> *Might be* sounds like a theoretical thing, care to share what is in you mind? >>>>> Current users and more important the new coming one are *all* doing the same. >>>>> >>>>>> ENODEV is more correct error instead of EPROBE_DEFER. >>>>> >>>>> So, you are proposing to continue duplicating conversion from ENODEV >>>>> to EPROBE_DEFER in *each* caller? >>>> >>>> The extcon core don't know the caller situation is in either probe() or other position >>>> in the caller driver. The caller driver should decide the kind of error value >>>> by using the return value of extcon_get_extcon_dev(). >>>> >>>> extcon_get_extcon_dev() function cannot be modified for only one case. >>>> If some device driver call extcon_get_extcon_dev() out of probe() fuction, >>>> EPROBE_DEFER is not always correct. >>> >>> I agree with this, but look at the current state of affairs. All users do the same. >>> If we need to have another case we may consider this later. >> >> Because we know the potential wrong case of this change, I can't agree this change. >> If extcon_get_extcon_dev() returns ENODEV instead of EPROBE_DEFER, >> it is clear and then there are no problem on both current and future. > > Changing NULL to -ENODEV is a trading bad to worse. > I would not go that way, so, it's your call. If you think that this change is not necessary, just keep the current code without the modification. Please drop this patch on next version. > >>> API inside the kernel are not carved in the stone. > > Only can repeat myself (see above). While I see *theoretical* > rationale on your side, mine has *practical* proofs. > So, I'm giving up on this and will duplicate same what it's done in 4 > current callers. > I think that it is more important for removing the potential wrong case instead of removing the duplicate code. The many device drivers already decided the proper error value by using the return value of function of kernel framework. -- Best Regards, Chanwoo Choi Samsung Electronics