Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4235958pxb; Thu, 14 Oct 2021 00:59:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJ43myP7levTtono4Izr5WtRntF66cKrIiwCOXt5Z05r447H6RqY74a5NMEF8oyg/0C9g1 X-Received: by 2002:a65:6107:: with SMTP id z7mr3120928pgu.43.1634198371873; Thu, 14 Oct 2021 00:59:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1634198371; cv=pass; d=google.com; s=arc-20160816; b=bP0FbSRfEH4YWoR3v+DtPzS5eoLEYOHVKtEb1VLosDb61lZKsJ62prk3yB4Lpu8O50 JdAnubtC4xF1qMQ3HPX0HINNpQ4zfTBr6/7/xkIAF09BJUdo7HvIRdIWQss48TyqbKAn scOHHeU9V80lvFoow1Psbk8zOmVEy7TAtMA6nG3JqaZhnVSywFvHENpJy5RSJiwQ2FEK JqcYMYcAwkyHPj0jhUwGCARASpD4QK8G/vgElbbbyvK58pJpuXrySwa805L6QMej5bpm 2KuKcSpVPhObX5OXiftEYm3zK9a1g9UTNe5iSnzLjgPY2boBnrEdjY+CWDuYh+eny4PL 0Gqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:in-reply-to :content-disposition:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=Jd3/6V+AWh48jrDGHjjSbWrUddYfdje8RxlLvl5qWMo=; b=Gd74UAtoPjoC1cVDtNRuz+ygFJS+QbfvGDLjwluSSxjZVNb8kcxgyBX9tRb5KtsY2y EulIJtsGyA7Mlyg2R8oTAkNpaIuO+MGF7W5rc2P4IbTOEUdEXgK3VXjF6RAv60QKDp5R GgQo2bT0MdP1kaDI+RQXlMsm+7OpGiiXmWy8vXxbaIjy+fvPNQHcGveS9M9padtJ7J4d hl8KYjbuHwzHtCi0KIaTRLGVPYBE2gThQtV4u48/o9tnRHcNVxBnCJZkd1vHeqJvctsw JNL60EC88zGE7mglj4p7NqnaqJaRid7FaQ9+ph8FG6xcR0/x2b3bJIWGvQnZduIpJ/r9 7wnw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=qOHjPo9n; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=gmtDOwUD; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ls9si877352pjb.84.2021.10.14.00.59.19; Thu, 14 Oct 2021 00:59:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=qOHjPo9n; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=gmtDOwUD; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230035AbhJNH7R (ORCPT + 99 others); Thu, 14 Oct 2021 03:59:17 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:49518 "EHLO mx0b-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229551AbhJNH7Q (ORCPT ); Thu, 14 Oct 2021 03:59:16 -0400 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19E71KUm007382; Thu, 14 Oct 2021 07:56:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=corp-2021-07-09; bh=Jd3/6V+AWh48jrDGHjjSbWrUddYfdje8RxlLvl5qWMo=; b=qOHjPo9nkZago01JWhoATmZq4vFKY9jMn64Y5GP/tA+zlmDRh6dDYYmDWlOYgKGKocwD DNnunc8WU+pZDwPL0ADEg7MZlodIDxfkAehPIW0CggF2Z78WKHfwLN4sP3wPDIHKvQSk YZYzg3n8ntTzP5Aalffk7s88BV+eSQ4ZJqtY02hjoobc7usQgJGTJIjS9r0vzd98uCtE j2DQDK4V4hCSD2auUwxSBCVApZICzECO9MrvKNJ04BRFXsVDvAyDR3JQNa98mXw17VJw 46wXLyA7t0xAGziuSCR6nBVRQt4t2MgIhjHkabEQ+/QsdsTavX4BKmh6du8DzFgMmJnm iA== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3bpfsyg8xu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Oct 2021 07:56:54 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 19E7tDX6188472; Thu, 14 Oct 2021 07:56:51 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by userp3030.oracle.com with ESMTP id 3bkyvc8f9j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Oct 2021 07:56:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jUF547hzvLKY4iNJY30CTbEsGpO/2QfbaecERvpBZBm3NFIqk+LakupQBsUBcr65RoOfe6YQ1HhaqUuNHgxFcZt2awDs80kOhj+qm9KHxBQMpqX5RdgOXIqy8/tl21r/FNUF7fUOhwmuEmKvTwxoyzFZGNtVu5QwsIJd2vNQFWKMMtjRVNneUxWiTpg5WLOyoHdQfKJ4JEYxz/o5ubX8HdM/S9qt0GU8IMg6nU5iHMcmJmR7w0QY8fC8HjnURuzNPJIHozeVMQwe4djF53vMH1EE0He9zSa+uCwpjVaz3lMN9smohZ8aTeFdNScX+9d+Y/wuK/HH1q6wGf7MXtQIJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Jd3/6V+AWh48jrDGHjjSbWrUddYfdje8RxlLvl5qWMo=; b=bNtsFGG2YtcMPhSdmTJNH2SWRwkAeVceqL0n5HYMmME5v+hNym9JRQzaFY51hvTjvq7cZOnBX+sPWnbyPi0rCFVc0t8ZCrZLkEhEoXzzaY8WLVfLwU5gr8MMCPRjUqa4u7TqwypbzGp8BbUa+2ornGflPVbqOW8O+mB/yVk2gPTydY1W0hbg6UyjSxRHBQomwUg6C88FysF1/2vIKtBmdyd6oy/vjIR+poIpirf99VzJfQwyLv00qiDMB20/rf43I5AIwA+sK4FcpyRKIWmJpI7b757HxBUyYmN5ct0XKZH9A7Q35nw3hx6O4OmyeJLR7oDuG7E3tJxUSQHL8lT3sA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jd3/6V+AWh48jrDGHjjSbWrUddYfdje8RxlLvl5qWMo=; b=gmtDOwUDdhpBj9G1VSyGQWptp0LfbmhNGLh1M5EvJU7kZVzmBBfaQrKMLILUEkUxrmyZeB82KhbsUiGNWpTbsXRg5Nh3DZ/qkpFjQwwkUcYvRGEF1IVl0sO/OkevhzJ4PQnmUfuuzHCwB6SF/AWfG+yIRsacodpmHv/OiTz9qnQ= Authentication-Results: baylibre.com; dkim=none (message not signed) header.d=none;baylibre.com; dmarc=none action=none header.from=oracle.com; Received: from MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) by MWHPR10MB1359.namprd10.prod.outlook.com (2603:10b6:300:1f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Thu, 14 Oct 2021 07:56:47 +0000 Received: from MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::d409:11b5:5eb2:6be9]) by MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::d409:11b5:5eb2:6be9%5]) with mapi id 15.20.4608.016; Thu, 14 Oct 2021 07:56:47 +0000 Date: Thu, 14 Oct 2021 10:56:30 +0300 From: Dan Carpenter To: Corentin Labbe Cc: mchehab@kernel.org, hverkuil@xs4all.nl, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, mjpeg-users@lists.sourceforge.net Subject: Re: [PATCH v2 06/10] staging: media: zoran: fusion all modules Message-ID: <20211014075630.GN8429@kadam> References: <20211013185812.590931-1-clabbe@baylibre.com> <20211013185812.590931-7-clabbe@baylibre.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211013185812.590931-7-clabbe@baylibre.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: JNAP275CA0063.ZAFP275.PROD.OUTLOOK.COM (2603:1086:0:4f::21) To MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) MIME-Version: 1.0 Received: from kadam (62.8.83.99) by JNAP275CA0063.ZAFP275.PROD.OUTLOOK.COM (2603:1086:0:4f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15 via Frontend Transport; Thu, 14 Oct 2021 07:56:43 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4728316d-82fa-425b-2071-08d98ee82c08 X-MS-TrafficTypeDiagnostic: MWHPR10MB1359: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2276; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qE72FBkbsPlnJbCyN8UVXF3P63/UI1mqfFTJgF/TtRrUkZY705QbR7gZyyCwAJVxyyi1hPhBMv6UYDOx1IzKIoQ6M3jTJBLPQJ1mq3boENHLeMSuzumNtDOo33cJByXhA4VppZ5UsLwa7jiZW0zY3BAKa2oUZhgIbPRjZVcHXzMqNWSSXr0DUgmkrQXxWFCM9kmwChejnZc5vVJ1/AbnOPDPaalrDwHiihIWrRXZxvqR0BZC8rE2oAjM6lbX/ru/9qvKAdhe8avpcmylIO163F1/cWZDA/XzUIWFKDIBXLqfOYr/I/NyVJUgeqCfWSGUIX2/a9l696q8m09VQxEQcTZA9cNkkKmG9DRe5KpOpBkrNunNOjip8DG0XkS+WVdWW3cTDPpZnJhm0iRZiBfiay7NF5uJJsIHT2Wxodg3W7V/m/QBRae/t63O37Glpt/+asB54/KqJ91UBBZBapINGDuUgVQErhjSq2bzNJLIVHFTV63cd2+lvKx2nbfUDKeonOibr8nBFD2D9mvysS9WKRbi0zat5B1Rv8zS5V7iNq+mgeRiD+PSb+MF0L4nifHwaT0cEOK/BvjyBH2obzsQw9wcNL0PjhpR9qkaE6h9bjYaNgT5BdBaVMjRYdAM4O+SsgSFf0f9hKs9FLMbLVULE5HXmlHSKFHzAaJSOev56EEGNJpXcUV8s9Z23vrR60CGbdQwWotmhcSXh8BGWn50+Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2365.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(8676002)(86362001)(9686003)(38100700002)(6916009)(66946007)(6496006)(52116002)(38350700002)(33716001)(83380400001)(508600001)(66476007)(66556008)(956004)(8936002)(55016002)(44832011)(2906002)(6666004)(9576002)(5660300002)(186003)(316002)(4326008)(1076003)(33656002)(26005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?LUrSDA2z6MqKQ+/87IiwYu/t3w0Td8yceGpikLL/xgde66QlZO6bVBlWYpdG?= =?us-ascii?Q?dtIToDT1ObKJQAXNul/2hfAy9yL6rIhWBntbMTwH0kRMAElE2RXYAxDFPhMA?= =?us-ascii?Q?Vse0zHEP6iHlzB3RAYQGsvq4Ou6tvTw7eZiUtHtvK9l7eZEQ+ivWKAdZJN59?= =?us-ascii?Q?cVETYt0cRhYBbAWMwbR+BwS/sZ3iBeATyn7ukNF9TQEi/BJbTYo+tjvIfTsZ?= =?us-ascii?Q?lu6G4KgFBgg3BQzZkc/2Uss9TsO/v4qCGNopbvr9NMORghNvEWIawCyqp7sw?= =?us-ascii?Q?KAqBbe2S1n/07TVBALtPh81PSgsuxqeHeBu5ihfvYtyI3DzBR9r1HHB6xQ/z?= =?us-ascii?Q?xIlbp3xl2IalBqfyN1T+M5+Wlr9mvA5EUu6CPkCA5ic9b2mm49wa9ktE/hr7?= =?us-ascii?Q?n2fZ/hLShk3evp1R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q?8Q+xHbmqPDIZ97LB3GXn2S9S?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4728316d-82fa-425b-2071-08d98ee82c08 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2365.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2021 07:56:47.6390 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: czY6t0NHCOlvOE8f+Fn9mzz43d7s5ExdBEmgOMNX73EXPLu0FXgC9NdEa4PYmLZ+uudcYYMtHux3s1yV/7wOMcEEQh/ZXPhCjxfYMqv9G8g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1359 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10136 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 bulkscore=0 malwarescore=0 adultscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110140048 X-Proofpoint-ORIG-GUID: YkckKRMifYb8Nw9YSD55YFm3_mKXDwah X-Proofpoint-GUID: YkckKRMifYb8Nw9YSD55YFm3_mKXDwah Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 13, 2021 at 06:58:08PM +0000, Corentin Labbe wrote: > +static int load_codec(struct zoran *zr, u16 codecid) > +{ > + switch (codecid) { > + case CODEC_TYPE_ZR36060: > +#ifdef CONFIG_VIDEO_ZORAN_ZR36060 > + return zr36060_init_module(); > +#else > + pci_err(zr->pci_dev, "ZR36060 support is not enabled\n"); > + return -EINVAL; > +#endif > + break; > + case CODEC_TYPE_ZR36050: > +#ifdef CONFIG_VIDEO_ZORAN_DC30 > + return zr36050_init_module(); > +#else > + pci_err(zr->pci_dev, "ZR36050 support is not enabled\n"); > + return -EINVAL; > +#endif > + break; > + case CODEC_TYPE_ZR36016: > +#ifdef CONFIG_VIDEO_ZORAN_DC30 > + return zr36016_init_module(); > +#else > + pci_err(zr->pci_dev, "ZR36016 support is not enabled\n"); > + return -EINVAL; > +#endif The caller already prints an error message. Can you look through the dmesg and make sure were not printing a bunch of duplicate stuff? Also if load_codec() fails, the probe function still does zoran_setup_videocodec() on the failed codec. These would be better in a .h file. #ifdef CONFIG_VIDEO_ZORAN_ZR36060 int zr36060_init_module(void); #else int zr36060_init_module(void) { return -EINVAL; } #endif regards, dan carpenter