Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6438300imu; Wed, 14 Nov 2018 01:14:33 -0800 (PST) X-Google-Smtp-Source: AJdET5fPyQtyiDHl9IdCGcvZoVCIBaO3+ICqqWbZ0FyvlGAi3N4g8xIOTTXuvzK9F/OkE7jv2aHg X-Received: by 2002:a62:6181:: with SMTP id v123-v6mr1130910pfb.117.1542186873196; Wed, 14 Nov 2018 01:14:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542186873; cv=none; d=google.com; s=arc-20160816; b=ijDMrQDLbMgNvzdUC3/JC82mbf4dD5/z/bhZT3M8qQuYcDQSWD2YkOPGiVGYZLbE+Q yREblnWblnf3cQKoK6m1uCE+TCgpNrWEXJZZu/DXpM7+TP8moSSIhBJRzFC+lRnzwfpr fyVdnKZT9lbMiRwrDyAoZzzVBpWWXBTE1gvjgJV+YKHLRnEZaXHQbeDXAYdrvQ9fo+FV WONs97nrdj/ShPK9m2Ob6pr9Trb7JP2q/7rWSCckPnzZJ9FuaOY1fZbvyGTI/LY2wzsu eXg0dMXeEzSebiDeil/gh72ztLLrPR3h4h45/JgKrZwov7lz02dqWPGFWAx0BHtad+9/ zxiw== 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=S2gn4YyB+De3Or5KGI6Y5e7NSUVAZy6a6JvN0VmO5OI=; b=jQAbK4ffb0VCnVyiB3XfNBkP+7FYjNDgMvpOSZkJwaAOI3wS8oG1LMkToyh1m3evC8 4df3beKWf048Xw1unENZFUPAHsgUXfJnY6wGZF9Bssw6UklxG/ZvoohPdmi09dzWXqNR /wH24aZkRWbc8d3WQhApYOlHIu5FOCkpYWnwAWxd11inFkzLCMtiVZxerUc1yc/2pR71 rowB4PwgWR+c60y92crSzGsM7LZaN6Ypp8Kl8x85OX6dVgp4H81YHiMAzRRXNdKpoiHI tiIX2nlV1SV/ZnPt6ddeA5Xy7YNUsQ5ydk/fPJcT/3nikfAkz4O2Va3PapZvEw2KcUxv ChXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=AJZsvrIR; 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 u4si21907938pga.91.2018.11.14.01.14.17; Wed, 14 Nov 2018 01:14: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=AJZsvrIR; 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 S1732405AbeKNTQH (ORCPT + 99 others); Wed, 14 Nov 2018 14:16:07 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:62882 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727776AbeKNTQG (ORCPT ); Wed, 14 Nov 2018 14:16:06 -0500 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20181114091340epoutp01ef0089779f84f29107c96d4d3d891097~m8r4b77QN0642006420epoutp01H; Wed, 14 Nov 2018 09:13:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20181114091340epoutp01ef0089779f84f29107c96d4d3d891097~m8r4b77QN0642006420epoutp01H DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1542186820; bh=S2gn4YyB+De3Or5KGI6Y5e7NSUVAZy6a6JvN0VmO5OI=; h=Date:From:To:Cc:Subject:In-reply-to:References:From; b=AJZsvrIRKbK57WajUInZGxyhvTQ4dwI0w+SZOD81cBNjIQfhaabdYU9g/IgIchuVc TUbtdUZULLdxjsC43EI0e6f7FXcUf07rns+iTzuQnOEydl4LTWkyB0geHUyylCNd1T dGWx/3cUz8aJEP/LMZB7OvZ0UMzd/lLIECUCOAkw= Received: from epsmges1p2.samsung.com (unknown [182.195.40.154]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20181114091338epcas1p359b0f840e44adc5774beb8c5dd6ca3ab~m8r2cWr5j0331803318epcas1p3a; Wed, 14 Nov 2018 09:13:38 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 5E.78.04069.247EBEB5; Wed, 14 Nov 2018 18:13:38 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20181114091338epcas1p2959991201c73f2c3c703ca7b242a9f68~m8r2J89J13113131131epcas1p2z; Wed, 14 Nov 2018 09:13:38 +0000 (GMT) X-AuditID: b6c32a36-f13ff70000000fe5-02-5bebe742d977 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 05.55.03701.147EBEB5; Wed, 14 Nov 2018 18:13:38 +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 <0PI6009SNEYP3LA0@mmp2.samsung.com>; Wed, 14 Nov 2018 18:13:37 +0900 (KST) Message-id: <5BEBE741.6050101@samsung.com> Date: Wed, 14 Nov 2018 18:13:37 +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: Andy Shevchenko , 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: H4sIAAAAAAAAA01Ta0wTWRj1dtrpoFbH+rpbI+JETWwEOmDhasC3ZlSMGN1kY2NwFu4C0k6b TiG6v/CJVlAQjQYtD/EF+OKxbKsGNkUBcUVEiQ0GdqNEC5h1E0DUxMe0o5F/3z3nfPd+59x7 KULbROqodMGB7QJvZsjxyvqmheHhq14PmgyDF+egvH2nFag/vwmg5kN9auQsM6D95TdI9KZF wp1VHiV6cuscic5eOK5EQ3l3ATp/6SCB+sr+VqDne6+QqOqOn0Cu4VMEyn2hRw9uO9AH7yPF Ci1380WVivMU9ai52it6rqbyCMkV39/CNbquqrm3DV0k5xnNVnPH6ioB1+L7U8EN1YQmTtie EZeG+RRsD8NCsjUlXUiNZzZuTVqdZIwxsOHsEhTLhAm8BcczaxISw9elmyVbTFgWb86UoERe FJnIZXF2a6YDh6VZRUc8g20pZtsSW4TIW8RMITUi2WpZyhoMUUZJuDMjzdXwQGWrmry7ofY1 mQ2qJzoBRUF6MbxWqnWCEEpLuwFscWInGC/VowB63N0gQAQ07TkPCZm4KRFPqokAoaGnwPeF vcrARgQ9B97tzAjABL0Q+odPKGV9D4C9L0fVsl4P244+UwZqJT0f1j79FMRJCW/0+8hAPZme C7vevwwePJ3+BXpK3kkaNTWNjoS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RjmpZbrFSfmFpfmpesl5+du YgRG4bbDWn07GO8viT/EKMDBqMTDa3H7VbQQa2JZcWXuIUYJDmYlEV7/6NfRQrwpiZVVqUX5 8UWlOanFhxilOViUxHlv5x2LFBJITyxJzU5NLUgtgskycXBKNTDWvOjQzeEKj2o4FeA9L4N3 c2GZu5Wz2p6L1Rqvfgl9VN64KFwprKjyYt/T220ehplfGGSyvS7+XWzjs1Shqra3y7hRxtbL Vn6et9amhHdT4v7zbv+7XKH9e2rtZFtZq5K/uzsL5JlUO7ncL7KcOF91zHdNCt9SmyA7wwz9 27euf+G+YG1iq8RSnJFoqMVcVJwIAHqv4Iq+AgAA X-CMS-MailID: 20181114091338epcas1p2959991201c73f2c3c703ca7b242a9f68 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > >> Sorry. I'll withdraw my opinion related acked-by tag until we are clarifying it. > > I honestly don't know what to clarify here. > > When we would have a real case we can change API correspondingly. > For now, the score is 5:0 with use cases in practice. > >> On 2018년 11월 12일 09:24, Chanwoo Choi wrote: >>> On 2018년 11월 11일 03:10, Andy Shevchenko wrote: >>>> All current users of extcon_get_extcon_dev() API considers >>>> an extcon device a mandatory to appear. Thus, they all convert >>>> NULL pointer to -EPROBE_DEFER error code. >>>> >>>> There is one more caller anticipated with the same requirements. >>>> >>>> To decrease a code duplication and a burden to the callers, >>>> return -EPROBE_DEFER directly from extcon_get_extcon_dev(). > -- Best Regards, Chanwoo Choi Samsung Electronics