Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752208AbdDCIhX (ORCPT ); Mon, 3 Apr 2017 04:37:23 -0400 Received: from mail-he1eur01on0104.outbound.protection.outlook.com ([104.47.0.104]:28716 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752177AbdDCIhT (ORCPT ); Mon, 3 Apr 2017 04:37:19 -0400 Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=axentia.se; From: Peter Rosin To: CC: Peter Rosin , Wolfram Sang , Peter Korsgaard , Guenter Roeck , Linus Walleij , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Mauro Carvalho Chehab , , , Subject: [PATCH 1/9] i2c: mux: provide more info on failure in i2c_mux_add_adapter Date: Mon, 3 Apr 2017 10:38:30 +0200 Message-ID: <1491208718-32068-2-git-send-email-peda@axentia.se> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1491208718-32068-1-git-send-email-peda@axentia.se> References: <1491208718-32068-1-git-send-email-peda@axentia.se> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [81.224.171.159] X-ClientProxiedBy: AM3PR07CA0091.eurprd07.prod.outlook.com (10.165.222.25) To VI1PR0202MB2559.eurprd02.prod.outlook.com (10.173.79.138) X-MS-Office365-Filtering-Correlation-Id: 736cbe5f-40c4-469b-29bc-08d47a6c9f04 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075);SRVR:VI1PR0202MB2559; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0202MB2559;3:peHKNUvnMbs8Rck/PI8EMGCy2xZVtomM+PlvhrsGWet507hx4F5bKQd/B0P2p0yolpWA+loCxK+Xr9EYJ4ARS8gW+x2lSaMOrqHs1ymHnOrTHdDTsNra97T9tKnRg0UCmbhJW/P1yfpkThsoNgmo4fCFUInZMCuteaQwqfHqv6pKw4STzLcqn5hD6kRrF19yZ8uL7ElNeVc59LLlXqhs5PzC9KkF1qie0NQ2FAIjkixfuL+MbrqllZ+1Tm+ZV5H1U1227lkPIG7bOdpTO9LJuDo1wMWf1b86S7c2c1a9Q0jxrZcT/pyPqDpx/NDMYS2C;25:zM49KxqqZZ7R9zOpKjWeEmWUA8o5pWoqxSxys1K6TPMVFeXmfjsmYu0WWVDRv2M4E3QtutOtdIkKyo+WUXJKxjMKIOcKd63/rWM7bRgI774EA9G96DCgH7Vp9KlGjIaAMEhTbCTNiIlYeomwxAOXTAPtOoV1YNOAsME47/dYV55d4HlPKgrz7Ia2u5aek/3DKWBMm28v9nTi80kBs12J0ZZcYzR7MKtSQAWMguITi8v2H6KOhj7WCo+I5Wyzi8ahDyh2qTn/+npdu/HtGwbH8IvcqSrZsTMpA8xmw39gbVKGWsy+DY0syIaWVYeAaWoup4sXayQYoRCv3ZsJOyV6LIS0oB79CcmRCTwy5A8X1LY+gnUVmLhPRSl00HCWTTg+4086KFjYYtHb5+A0KvY/e1I5O30Bzr7ipyA+JQGPQGmwwNBuxO0rW2SZ1uCf1YC4fUccXfZQ+syYyT9e2A8yRA== X-Microsoft-Exchange-Diagnostics: 1;VI1PR0202MB2559;31:FV0dX7axEG0zPqatOHZO+L9OIFyXCHF8E41v6rOaLMtyFEevDDuOPhpE4dW6WLSabNHqurg65z8TVgZgIqYfk0T0KfVux7nLYJfE1DdqkHDkWbYWu4+Ceiu4IBN5sCO7kxFaVu4bIEPJO48KVff6pMphhXcuiIskaddyFpeSojnZhX4pYGBRdrDEm0eZXOvW8efRDFvCCHLOG9y5lXsCeXpvBcME20iwnKzojudzjRegJaP1ika802JTY1SQG3dbbBQvai3eFL8vFaLoqH3Bbg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(2016111802025)(6043046)(6072148);SRVR:VI1PR0202MB2559;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0202MB2559; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0202MB2559;4:+esQDJ0XvasB6EeyAcUgcTUbhCV5MiG2cYvyn1yiH7k5U/r9X0rFSc5SY2tVmVQDHv4TOM8SZpJuVHbrSxKRKJ9GCbEmCSMkR3ya8KIGRJ15G4IGqEalMZuYidQFoSrdcNp4Or8yF+x8VIBvsnLattogn2D520hha7XxbdWXoiBvcWS69Rl47WYP5AM15XuGhLe22MuD1/jsYwVZcP+ErYsrukizsu5CuamRKN0XhQqi2nh3anP63qiuyK3350DMBWfo7WoeUQtD8OUO7c4LCuZEXYRvAOBXpfzvr2f7328jmwGhkILUSpFaXwSZAQR6tblGTekSSYD9Z8gTkWAkscKi/1LtzMo/hFJw+glP5exXUZ3DPtZEdg/fiUR7+9sUTo4AiVEiuvPdBb71rLun8gmK/DOlYWD18yfgICZZhDOZ0e2VnIJ2xiffDYUvVwRbBWfx74Me5dRNL0T6MqiB1eInRubC5mwKK71GX7yaB5EgxNz4+TSBo68EB0seeYVVtGpBJhlJSLp42iMwI2TldBZ9fVx0gqXoxVZi/41a4LWvTI7WznIqxsxI7A6e8tsG4QeH/bpcbCT9OhznQ68T1OPhqZZn0o4kRWehzST71J0oP49/6EddZk7olZw4Io655Dl1s/k8OQzJwd8DDlHsQDHrZUpQ3ildiPCfTYm2yVulXiVt0aJDwTM8pDcbyhqrGf7hsYtJ+3iPCKsaUmXpmcYMQ81vwxxavvWFcuntKLsxvOt/+tIj/NO/ZgfpPQZMGlsKbzO+cwDpdVV2X8JEuw== X-Forefront-PRVS: 0266491E90 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6069001)(6009001)(39400400002)(39410400002)(39450400003)(39830400002)(74482002)(6916009)(81166006)(6512007)(54906002)(7416002)(86362001)(25786009)(2950100002)(53936002)(8676002)(5660300001)(6666003)(8666007)(48376002)(2351001)(5003940100001)(33646002)(42186005)(3846002)(6116002)(305945005)(6486002)(7736002)(50226002)(2906002)(50986999)(4326008)(189998001)(36756003)(38730400002)(110136004)(66066001)(76176999)(15760500002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0202MB2559;H:localhost.localdomain;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;VI1PR0202MB2559;23:Uxh6ldpVXeIT13ZuBWi2ooAfewx8Mt2P97kAVwx?= =?us-ascii?Q?Ef0ILLHSnlFL/U2gbrUbSw2pvhDmx9/cHh53eODf3+YFhHQKBVn1KohDo6Xl?= =?us-ascii?Q?qJ75AvOaiuigpgZO3gjMZ4gwywvQQCgSJZR1Fo6L8e3oHBnAsBhm233HswXw?= =?us-ascii?Q?DGUHohXsqDdECBABrbkv+SwMgXjgnKIguQlCX+ibHL8IqhL1T8ktJeYSdcXT?= =?us-ascii?Q?hEhqDfFKvL41Q45YaGFU45KimM0Y7dXtW/42qKRELyDEEw138ByaYWF8VKrG?= =?us-ascii?Q?XS/GlCfhiKTs8/fvE8sDzK6MA8ptu1sNWVHdZKZKB4TG7FIllVockXgZ58OT?= =?us-ascii?Q?C9cBpaPWoVHMFFLWXcMZmKTUqw+OdtCp+JcsYSxx+nZp9pPH2ugnmDHeywww?= =?us-ascii?Q?Cb4yXGmUfFgGofc0rKALjlh92xkPT2XxEy6Pa0RF5bVqrNv/jHBfXHstHwM8?= =?us-ascii?Q?g0I1Nh22Gp8FTIHVD+0v0usHD5Sswyk6YbcZNroqdxwky/0PZzlKM/4rSMCN?= =?us-ascii?Q?oRQssZR0VzQf+gYQ60FMkX2MRBWdqHg/1PJuFVPcPhCgLY9VzZiW5hssx4RR?= =?us-ascii?Q?jFiFM+qJq36F7HQRPifciiBM0L4jW9U+1iN/t/s/dd8pJmcESdxh8Lx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GA3QrpYmrzm/XezjF9IHLkHnUyvwmMRJ5Iz+0IpgxkB/p5wGNlyk9v2rkuAz9LdKBoskJpI3Tm9IyEMw==;24:Y1m++p7XmI1RdyY5uGoi2q9p6jkfRGB4E83t/MIixMNptYrJN2bFoI/xbaTjMaNqSzuSLnBKPW8szKQoKtb2CT6Lfyvr8GQHbgUi7gZYDog= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR0202MB2559;7:K0789SYM2pV/mwdl77w6yYkZsNDc0ci9B7Hdn6L/QUcnV4SX1fNdHQs8cBCU9LGS9g5/To66WxQDElHeVH1wR0kVr0GhzIbiPoX9rPnviPE8lw8O3ZKy7hhqoUEVtfBpIK2qHeywa+vBABy9WxplryUMN7uImMHzNdcRhNlCzNoNdTYCW6X2gfCJ1j43DQhTL3w+7APOD3oVQ6J8CuW2mVStxtg5V+XDjo4xsNj0LpbQ5i9hUbT7ftpsEI333SJcyBqgN69il3+S6JgV79nMFkCn3bKT0jAUENIi5vXZ3T/8S/+lSVY9KhHQ1v/70BhWMgBIMWKbeZN6/GiLYy+kEg== X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2017 08:37:09.2835 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0202MB2559 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 969 Lines: 34 No callers then need to report any further info, thus reducing both the amount of code and the log noise. Signed-off-by: Peter Rosin --- drivers/i2c/i2c-mux.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c index 2178266bca79..26f7237558ba 100644 --- a/drivers/i2c/i2c-mux.c +++ b/drivers/i2c/i2c-mux.c @@ -395,13 +395,16 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc, if (force_nr) { priv->adap.nr = force_nr; ret = i2c_add_numbered_adapter(&priv->adap); + dev_err(&parent->dev, + "failed to add mux-adapter %u as bus %u (error=%d)\n", + chan_id, force_nr, ret); } else { ret = i2c_add_adapter(&priv->adap); + dev_err(&parent->dev, + "failed to add mux-adapter %u (error=%d)\n", + chan_id, ret); } if (ret < 0) { - dev_err(&parent->dev, - "failed to add mux-adapter (error=%d)\n", - ret); kfree(priv); return ret; } -- 2.1.4