Message ID | 20220411105650.723082-1-wanjiabing@vivo.com |
---|---|
State | Accepted |
Commit | 802239d55d0a76ac2718ed322ee3f2e41c20f6a6 |
Headers | show
Return-Path: <linux-media-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DA12C433EF for <linux-media@archiver.kernel.org>; Mon, 11 Apr 2022 10:57:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245038AbiDKK73 (ORCPT <rfc822;linux-media@archiver.kernel.org>); Mon, 11 Apr 2022 06:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235545AbiDKK71 (ORCPT <rfc822;linux-media@vger.kernel.org>); Mon, 11 Apr 2022 06:59:27 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2130.outbound.protection.outlook.com [40.107.255.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C65EE40E58; Mon, 11 Apr 2022 03:57:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WrK91Rcr7HaSpqwvYN14E0My8xk7Jklebi3UMJJqkasKHaKNQMp2TxD8FpP68O56gxuutt7IW0o9cvIlY+X9XqScgw9SlGeisW5Yq9DOJglcIxz05SYyXxXIC+ltOiZLQW7AvAOpD6arVXM9Tp2kRe/cA47H7xJp6fS8rhQRwnT9lYO8mAaTNpQdC52LhpM+Plor0HO8FTI4CSn7jAbY9/bdl0aN1wlv9MVDRXsA3Ffzd/kP+kJPdymBdusqTndVW6efjS00u9mqXV9UBuPCu8QzaxgytgV4dkpq2X8MZQ5j2MxU7MBBQgzaOGfyL3rrRtzvpxkUYb/qHtJOi/G/Ig== 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=trubSA04mwfQ5T/pC46qE9j9HrrWwOgmYHef7nMKAXI=; b=mQMefTsvUHn4tmhBZ/n/bgY38H4hwwAugJIeIVFZwehAUaxlYCMkgECPYQB3dKZUjp2FvwIF1V8XXn8yuyQpJOhceg7L3SZJW2/w5IbKuUIJsKOLlewoXF1BejvkmIsfj+eBulYw80J7yWrMB9M4nh4R1m/yHp8x5awtuabFTPOy2ulhL9Bnj4vxs8Jf2hnz1G0iCyrnut6yeOoZfDnChyatvpfe8kA7s2tTWsXiqlXM7JON82TmYpjQbMCmLY2WMzNsNE3T4VrXTXQlcITG+dSpS3QOox/KwS0cwys3Ttz3jQTTxK7zZMcvrMPQl/zX7net9mTZHcrFesQ88Uipjw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=trubSA04mwfQ5T/pC46qE9j9HrrWwOgmYHef7nMKAXI=; b=oxFcRSGG7I+1YsfS5OR+OMtyP4q8Mj6g4lp2OmnswXKYdFiyYyreb/PfePNdAXrxojRXgz58cSm+KJDKbmucR96uOlbwkDFiRE16x/8M/iI1w/l4G80NbuMK4YlLTWWtSHov78Bt/LrqCgKCZnRCozOq4ocmUvodVj817i8BTcY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SG2PR06MB3367.apcprd06.prod.outlook.com (2603:1096:4:78::19) by HK0PR06MB2289.apcprd06.prod.outlook.com (2603:1096:203:4e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Mon, 11 Apr 2022 10:57:11 +0000 Received: from SG2PR06MB3367.apcprd06.prod.outlook.com ([fe80::c8f1:10:8ae:e8ca]) by SG2PR06MB3367.apcprd06.prod.outlook.com ([fe80::c8f1:10:8ae:e8ca%4]) with mapi id 15.20.5144.029; Mon, 11 Apr 2022 10:57:10 +0000 From: Wan Jiabing <wanjiabing@vivo.com> To: Mauro Carvalho Chehab <mchehab@kernel.org>, Hans Verkuil <hverkuil-cisco@xs4all.nl>, Yang Guang <yang.guang5@zte.com.cn>, Arnd Bergmann <arnd@arndb.de>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Wan Jiabing <wanjiabing@vivo.com>, Colin Ian King <colin.king@intel.com>, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: saa7134: simplify if-if to if-else Date: Mon, 11 Apr 2022 18:56:49 +0800 Message-Id: <20220411105650.723082-1-wanjiabing@vivo.com> X-Mailer: git-send-email 2.35.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: HK2PR0302CA0007.apcprd03.prod.outlook.com (2603:1096:202::17) To SG2PR06MB3367.apcprd06.prod.outlook.com (2603:1096:4:78::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 72763a96-cc37-4d0d-7415-08da1baa0660 X-MS-TrafficTypeDiagnostic: HK0PR06MB2289:EE_ X-Microsoft-Antispam-PRVS: <HK0PR06MB2289C547983BCBD5D51678DEABEA9@HK0PR06MB2289.apcprd06.prod.outlook.com> X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4qZ8UemkjnlrqZhC/1rcKK9rSbVXtROFeSYASokHO656gqEfon31ty/LYdGfetFS4CCa6W9szgEx3xCDtOcLPKHeK1N2tSgJtpETc5OrinEPJvKZnedx6dxZ1JEnJSBqnFPmQdGwkRWZGJaemJOGTyaoWWE1Im55vTGXNJ6NEyPkzNxGXoWADZI+zMwD7oDLJgbDTgjAIElIpPfplt2ZNmKEKY5iobB5DIxa6uYU/jOIWpdmeyt6d4E+qmW2oazHiTIo1O0+pnQy8AqKNZ85Hyxa9XUOyEEKZRA3ScNVguT7q2Mdqp5x+MQQ5VLPYrSj4yAm+zBoDZEpgvjjg8niPBtoYjr5Uk3LiQ03HH8qL6EhSFSBbnr/OwWHfpwwqaZ+tDiOj4QiNbRGB7fUaFNjGqV3CQ6pZ+0VXyc795eXkQnDyV6rYuvh7VenJtoqdpek1m5tCzUVIzgQ4SORUMnFaylvQvFMoraI7IZWKzVQRrayc34QicnoR1XDm8zYxm3ENVWBGDrwBjnFSoZT/xEbpNz8xN50xavzAqSxRGoTzSwOZVN7H5qOXXZGYE0f2iDRswosO9jHr03std2Sb1xy8YhjETXIywXghdyUZaJbLBtuvqM5mY0K3duVOCOY08RZ1J3F7TCwjap07Zw7dLZ/NKOgzoB+JwQ1TVRekIdTrmtRm1YN/qilJS7P/AfC//ObqwdSb08ihiFw2hDnAEaXCg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SG2PR06MB3367.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(2616005)(316002)(6486002)(1076003)(26005)(52116002)(508600001)(36756003)(110136005)(38350700002)(86362001)(186003)(66556008)(4744005)(38100700002)(8936002)(66946007)(66476007)(8676002)(83380400001)(6512007)(6506007)(6666004)(2906002)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ChUGFLUW8JAdF3YWgJ14cxT+49DbXiKJ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RCodFf2G96pcd86rnn9AtPhkrM0DpJzmnUPw6dNekPkQ55K102CEdkyeKng97zpGmRPnIm8HNi+ZrFfLGne2KjCA3rtOgJ6mmpQdHhDo/HJUZIOgoa26yzMXjoKjgT7G0iPuAf4k5QH0BnK6nycNOSW8+nPfIoPmWZpKxp3mV559EofIjhkcpm9KRnpR/PfcZQ4N79+DO1j0AMlBw4HawGoU4SqFWlXAk0ACSEX4sEojM8ya2nW1OOzxp//Ab2Mzj3UC6bmArp06iLrJbGoPuaR/+MiwxPYWEnCrVpTix93hq10/lfSiIqTMLbCQjvKw/8W8GAR9kRewBeBkd15NgttDUByY1yU0wJ8OXrPgNugmb9IEWJIPFNxGoDxB9qdgPBAF2dQHquA6eBbeQ2TqE1ZUESshyjiJxA/K0SV+IQZxbxzl6XSmlXz+Wzd0itpW8ekI/pvMUJlPZs68TU/gNOetAF01b0+epr6YgTSdV3v2X4tVad8FMTY26QyKVD7cvnpmdzN6vcLAgGxMHkTnGy0RUuAy+0XaDIjy5hkFmWh+9dWtjvNZopRNGowo2vPvS40OqRL08c7LGChpefQdtf/qzj5asCQZswdB80nmkdac40pHE5VDcoEZw/Vo0sxYnWnxVA== X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72763a96-cc37-4d0d-7415-08da1baa0660 X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB3367.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2022 10:57:09.9064 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mOcxZQS6CUPTOWLk5YSl5YWs8PhZTq74j+9Uj6qOC4Sxlm2Cwuok5+jMADzd9CK7iu1zTJvwyLzLzi1b7PvW5Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK0PR06MB2289 Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org |
Series |
media: saa7134: simplify if-if to if-else
|
expand
|
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c index 48543ad3d595..61e678c1c2f6 100644 --- a/drivers/media/pci/saa7134/saa7134-video.c +++ b/drivers/media/pci/saa7134/saa7134-video.c @@ -1833,8 +1833,7 @@ static int saa7134_overlay(struct file *file, void *priv, unsigned int on) spin_lock_irqsave(&dev->slock, flags); start_preview(dev); spin_unlock_irqrestore(&dev->slock, flags); - } - if (!on) { + } else { if (priv != dev->overlay_owner) return -EINVAL; spin_lock_irqsave(&dev->slock, flags);
use if and else instead of if(A) and if (!A). Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> --- drivers/media/pci/saa7134/saa7134-video.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)