Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752173AbdDCIhG (ORCPT ); Mon, 3 Apr 2017 04:37:06 -0400 Received: from mail-he1eur01on0096.outbound.protection.outlook.com ([104.47.0.96]:31631 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751993AbdDCIhD (ORCPT ); Mon, 3 Apr 2017 04:37:03 -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 0/9] Unify i2c_mux_add_adapter error reporting Date: Mon, 3 Apr 2017 10:38:29 +0200 Message-ID: <1491208718-32068-1-git-send-email-peda@axentia.se> X-Mailer: git-send-email 2.1.4 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: 78d2d3aa-4238-45fd-1a68-08d47a6c9807 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075);SRVR:VI1PR0202MB2559; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0202MB2559;3:+cfez1kqNzE3guPFbF8Jyo07CQj+cj9KCCHJrcuIzU+ooUC/tnm6V3t5nIt8oQhN3J2b/6yHK3X/SF8+UvZHl1dgY7FBq10CXueTffDixk+odt2q+OL39ztX6ObLSW4ftOMOdfyOlWrFuIrsH9R9tG8SXLSFpr5xCKuJm7IZWzPLF/5UbUwJZhi+z5SZuvN18wJY8vZmJrSUYTpbVCxO3oJaxsdtrwluujKdtL8xsQbfPcU27ULq7dp+9GmLl/nJF9jH88cZo5SgcmXPErkYvOkYshvNEvV/lXvR/jVtrVUdb9xtxAB8IJsrRaiRwgT9;25:mXBL1h06vmakpw78uH3aKp+zd81GpDVc8Yhkb0cRK++a7noBZ+PQ0lBR28JPAem3awONa1O1nwnkTHum88KA4O2wmZSeTUsFe8ZB0FxEy14imn5hj14Y9zAfderBwQzVfIFXgQYQSNgYZbp5byBfM9jFYdyZbKREV6teLlwucbiHUkfMQ7v1KWo2LGhNcaslKOfoZ1WYVtC+8SQzQ/JZOYE8NphZvYcNKdAimaVMfYBMm6Uzx+ymdNswhnFCr9Ce3sbkYZjlbkmKccHHJgExvKbdf1Tl0dab9OAEg2TYd/Hn7Xk9ruCeHgm+ERR3jJw83db8WBr5GCx1xyELFo+G8+DcftNrhqw5LYjiVxI2LbJVprgeBm88dP5YZ4zPGKCsti7ArQKL9/XkBdObQNvDGmrNiAiNYl3MqSz85pQnh3bVGEIzrrsfLE5ErSHa4tnPJHmCWYFRyZRm7+G37Ffzzw== X-Microsoft-Exchange-Diagnostics: 1;VI1PR0202MB2559;31:S4iLYRZRAsDw0UK3PWuHu221sM4ymEo3JSM3JbJCCwJzcbb7ES8tahKyRmBvvhaf9lK+PCTgm+0O16n0EHnjPHBshACItCclSstUrvt9bWe5RDSUFC0sKrZDiDEm11rSh7+Z+ZclBOY4bhn8+jRXZpYCSQhlKQGG8GjqCevPoBAflsjfx/v6vwAFEXxcOEkMxmpZz+EZPtRKhOIeoC1YmeBLxyV2JNLO36xoN+FPXnaod0MtcztiDE/M73MPbTxn X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(211171220733660); 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:Qa+TscvYSg1HxKq24/RQggxM4GhgESAaxtjRE4wcCWURyUKzRYklsJJIG1PNA9sRp/ZiCVjIpc+yrofNkHjHDcLcsNjBF7Lo1ghXkdPSAk8IsTNZgLP67pEDuR0UpsUWr67xLPVlaQHW0+RXSTyYuzqMOndubLegy0NmU/jEpW5tVHmoCrHyuWnf12VNkEYRHtk6YATMzodex36SKwJ+6DuYqk4XarefT/sazWvggo1OqoIKN3PmGAvesH1/jiJTlbot6tww9raQ61Yl37uEmTm7LigCNQhKK6JvCu3SoeHbboIHLGlOIroLrPut/LqzMsRhb86kp+16QJ3zBHvM2dwGXAirALE2ato/k/du08Cuz2e1zGBpXC3AApaLFRHaRs0ZehPvuueRoSjIAh2dgiJmnXgpRq7VAbu4dik3L6St9Ark2rjq0VY9S29VwjkwxjNqfUWS+F7dZS2UJhLHT5kAD/iieyMpuygoODtCo51cP5QMSE4P8GuvTQ48ED2Aejwe+fn2pXjZHWT2cdJEMJAOovYem3kd24IzywmYW7/9FEQZK94mv4pgQrdjO6hjKPsjZmFWjf81APvLm+I3ahLrdeUNQVYzcKLBTve5kxkdcsTLjoU55bC4f9S87shr2Isjz3pUzOkjBG/QZ1EyFx5scofycnlutHoglWywiHjWqQ9GDJZXSii+/07I/NssuHtDZiYEgXes7n59+JvhR2/D/oQ2hick3RnXQhTvKK5RTpjd8VucV6+BuRJ3DJRHmXZikdyWp0G4bMKPEUNjpO+3OWq9sJ72V6pyPr1Fdtb2PdL7qcRQOsRXSqg+HPKd 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)(53936002)(8676002)(5660300001)(6666003)(8666007)(48376002)(2351001)(5003940100001)(33646002)(42186005)(3846002)(6116002)(305945005)(6486002)(7736002)(50226002)(2906002)(50986999)(4326008)(189998001)(36756003)(38730400002)(110136004)(66066001)(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:04nv1gzv5PwRqx7u3ZOaLwAliFxpKGYy+0eA2dG?= =?us-ascii?Q?U+HnXhsbRV6EDChkczoZCBQNz81VXL4rjVkG36hD88LBGBv0ZWqUh0aXWbYb?= =?us-ascii?Q?yGeA9PyExz7WJJNVyom+Zd4nC62frP31oum7/gDTI/N2cqPoUl3pz7jsYdxU?= =?us-ascii?Q?PvrQas4CulVaezWNWkPkQmp1JSwkWjYPrtsKEQaSyqUaU7NmypFWGoYyvz2S?= =?us-ascii?Q?IltpW37ewfgFcDgjZurHk8pakNq3shChlgGajZ9rOJBk8IpkDS0Hof+NbQfx?= =?us-ascii?Q?jNc5v9rGrsx8nRhjX0kt0Cyjiyconh/OI4DhaspSwMz2EhcPgv1TVjkezyjF?= =?us-ascii?Q?doXTpimC1/MRXXb7/hCvm3ZCReiaj5f5eG/0870tQ8kWnKnqFZUrABCqHOlg?= =?us-ascii?Q?bmVGlEKxNAma+XafAfMnMEkmWFCCt1QKeXn0SLgUv0sR+9mlDynvaHjVPMty?= =?us-ascii?Q?qog/SRsNd4UT/uYVgMKmA3L39hdnG8fUz10kBcj8lrt9JytX9qPq3bOB59s0?= =?us-ascii?Q?P9VWY0Y3shIlqPe3jR1t7LmZCT2iAmeZ8ZnKM74EAEPSp7H/5SwOyyuBoKhJ?= =?us-ascii?Q?tszHEtI2GWFkGrMpvGs1VmKZcv2QM30O1uzTNcU8SCpPQTJiuXx6KA8Xj8GH?= =?us-ascii?Q?jRabsffAfUjmUx/0xHLmPIP97dlOI1DxICi/GniU+FwUvbDxLsGR7tKy83rL?= =?us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EznjBktamGILO1KHcIEsqxRpSgo1ujJKXKkrSiei3X+olzM9uO2UJm+na/h8iE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR0202MB2559;7:8H/aD9KaPoBhFggih/z+aLqsPYmN73CrZmBZ4Dvgu2s/5aNM1bzhq0LVi8PY/AxgXhZuHc8Tchua5VGV/ohha/qWurcmcLBBl7V2Y6VXqc/ZA9tCDA2VIWaEW+bSIiH50mCvtn9Wzg51uS2+6PCIb79xIBK17Bu4q17wMNjSUePxgwGOifMTbgebH82fgqjnyzTLLaxM7hklGgEpmSBcyWvPz262BwU+hnvwTKCjzlCrig0vl9zsaKHWm2ycS02+E9IO+qNwnhqEx4nOYT1j9h0j9sJKEzd8t4IEC3P6EJM0uu1AxGaV3IuFsIIQWEm724bd9cWSVmO8Ph5GLl7J8w== X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2017 08:36:57.8750 (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: 1450 Lines: 38 Hi! Many users of the i2c_mux_add_adapter interface log a message on failure, but the function already logs such a message. One or two of those users actually add more information than already provided by the central failure message. So, first fix the central error reporting to provide as much information as any current user, and then remove the surplus error reporting at the call sites. Cheers, peda Peter Rosin (9): i2c: mux: provide more info on failure in i2c_mux_add_adapter i2c: arb: gpio-challenge: stop double error reporting i2c: mux: gpio: stop double error reporting i2c: mux: pca9541: stop double error reporting i2c: mux: pca954x: stop double error reporting i2c: mux: pinctrl: stop double error reporting i2c: mux: reg: stop double error reporting iio: gyro: mpu3050: stop double error reporting [media] cx231xx: stop double error reporting drivers/i2c/i2c-mux.c | 9 ++++++--- drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 4 +--- drivers/i2c/muxes/i2c-mux-gpio.c | 4 +--- drivers/i2c/muxes/i2c-mux-pca9541.c | 4 +--- drivers/i2c/muxes/i2c-mux-pca954x.c | 7 +------ drivers/i2c/muxes/i2c-mux-pinctrl.c | 4 +--- drivers/i2c/muxes/i2c-mux-reg.c | 4 +--- drivers/iio/gyro/mpu3050-i2c.c | 5 ++--- drivers/media/usb/cx231xx/cx231xx-i2c.c | 15 ++++----------- 9 files changed, 18 insertions(+), 38 deletions(-) -- 2.1.4