From patchwork Tue May 31 07:28:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 12865137 X-Patchwork-Delegate: kuba@kernel.org Return-Path: 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 F1D31C433F5 for ; Tue, 31 May 2022 07:29:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244510AbiEaH3X (ORCPT ); Tue, 31 May 2022 03:29:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244507AbiEaH3W (ORCPT ); Tue, 31 May 2022 03:29:22 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F100F8BD27; Tue, 31 May 2022 00:29:20 -0700 (PDT) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24V3EpHv005524; Tue, 31 May 2022 07:29:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : content-type : mime-version; s=corp-2021-07-09; bh=2ndJySaZPT7fcR5wX8jqZLgyxIMoNmc9Py9cgo8Twm8=; b=u8JDLH0HIz2MdAkxAEqFpITmVDDA4ysuzEW+34rGcUDFg+whns6ati2u8j7WzaZos0y7 HoowRQ/GzKOfEkxBOW1dwcKupnQwEUjY6xfkreW+x8Ig85A+aNW+H3DAi+nwKYqMXXka kByda3HmoGW7cfIxQQDmjpgdLPeTAh8T9dj2BcYyl/YBBF3K7JejSdMb6UmEdzjNTdA8 OIJ1V5wcR0FDtl48ddZbbI0aavH2QLqhJK/X9fPpAHBkSJIrfN5ZjuUIDop2siH1cYgq kzO/SuM57WNnFzG5lm39b+GQBu8XkE+39lAEd/rlmBBFoSlcOpgYt1FkcJUbbkQDmWDO HQ== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3gbc7km6fc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 31 May 2022 07:29:03 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 24V79seb008744; Tue, 31 May 2022 07:29:02 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3gc8hrahkh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 31 May 2022 07:29:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IMkrYL9hI+5TZoujwFSuFggLsvzqt5QcjMajUofV/kYse3r1DE453nN4o+Myy5780NF3f2wzhAiaT2uUzxuNoVenqEMaxVnteoED4ZQt1pxtfNH3uYsN/RGihiLqjdq/6c9uAVHyA2iVtzHP/Fn7rHiEbCs3RAR5OFFsn6clEM1jX1ZeGpm3ZaaKJTFOEw03Dz2unodV+lAAqWbCyQKEAZm4ptQyuEsUTzZVqrs3Nbt4RWEjlWbHdrL/dNYmrdh5g4xynLmUuo871GLeF8QABhXHoMZsWOSqNPz3E6Bx4doMmCsVcPvsyVVMiDiirRE30u/hq7Lc/883PEQLb/VZPg== 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=2ndJySaZPT7fcR5wX8jqZLgyxIMoNmc9Py9cgo8Twm8=; b=ibRTHBvHqThdFEnuDJmgbh17FXhL8IPSePbamXBVFMH4ZsSCZOqSg6lyEo1ubKrurBu53vjpNAbOyrAwXug+3vKmdnouJJ1A//S0xc01cO9EAKXw9cnRBizqeei2te7rvFhgfutnUppcv4iFrWZWMClcSZBoh1rM1jH+3WO1A4bQn7xXso78xcCgploY3rL1OxlVGdGMq7iNwslp/c2uxRsBen1eNngROY+SJAu442ZVfmYrzbtqBzC3chwgRcO6WgL6K1yRl/FcQWcu3M4IHrTjEqbXmhDPViUkfn+NfYoWWEpp6+3YuI+0qEihGzWGTNJAkCRS3DWe+W0WdGD3fA== 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=2ndJySaZPT7fcR5wX8jqZLgyxIMoNmc9Py9cgo8Twm8=; b=yTeV9wjnUOYro/SkrxflB1oshgA+FahN0hd9fnO/HGTPVQ5bFucdDtKCWScQmtCTN9QTpHxy3KeR4d1GgUNl4dq+e+/+3LoMYmNBWpSTz+TcxFWNXf66uz9d5so4tAVFlp2CzS9kyRygcMb7PufsE7aoLgffgvZhALTQ/KRG+eI= Received: from MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) by DM5PR1001MB2204.namprd10.prod.outlook.com (2603:10b6:4:2e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.22; Tue, 31 May 2022 07:28:59 +0000 Received: from MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::86f:81ba:9951:5a7e]) by MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::86f:81ba:9951:5a7e%2]) with mapi id 15.20.5293.019; Tue, 31 May 2022 07:28:59 +0000 Date: Tue, 31 May 2022 10:28:45 +0300 From: Dan Carpenter To: Sunil Goutham Cc: Linu Cherian , Geetha sowjanya , Jerin Jacob , hariprasad , Subbaraya Sundeep , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Srujana Challa , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH net] octeontx2-af: fix error code in is_valid_offset() Message-ID: Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-ClientProxiedBy: ZR0P278CA0148.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::23) To MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 22f62dc1-7aff-4eeb-0616-08da42d73a5c X-MS-TrafficTypeDiagnostic: DM5PR1001MB2204:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fKyJi7pHYQOMJA2Ic4PzWCRErYru3c43tHUnbWUSROyJ6c28D1BeskD42ass2Nx4eCnHaekW1IwTos7d7aecQjS7xfJ4q4r7DqJ+CupGtRelxl8NLvlL0pJJEmr07wuCdf0vc+XE4kKv+ZqxzfBOml2Pk0T0lAS1FvtHD/4CxPeWLitmjLZSM2BnMmOplpOd2lrZbsGVTmbUaBV1K3UmRP1QxHGGlDmNC8xpaSguR7AhfXzfeO+EOlsStbE1eoYDFejuAMBvL0eqSHoVbUAeKNDIK7FeLe4Wh5+hwqASIBWMc6XLHnefA6BB1mgqBA7T+KfyoduIg38XcxX47Faxh9+tRoJOWzOptjg+njbf3C5I4tyq+tEOKK3M2IsvvRw8HkOQU47Q3HPN4ijvebfaPtv7pt/cajXkG8RoOpNEkJFvJOYt3hcdCjNzmrlX6n80KwsYFCoRBjzJ/4hu6wBEYUrEszVmloqQGgjZYIL831EJvT9gN8Yslx0Xn7NNEn6ZOzoHrXlnuL1j7Dm9HE7n7EPK9qeMtKRGqmmWbeezHDTXW2gpHrFDaxXbyA7lAZLrBBkf+a5xZs6o9+JORBcUq3OkxAyG+OpAK53dSMgqK85QPy5jzQN+Q8MxW0cLmUCLPjyuT16LHJvdBt72VvAlxt+3EIufGTjN/aQJt3Velx+WARZPciEsHLkVjomcPxClVdZQLiZTggzccsbkpHA2sA== 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:(13230001)(7916004)(366004)(44832011)(186003)(7416002)(5660300002)(508600001)(83380400001)(6486002)(6666004)(316002)(6506007)(66946007)(4744005)(86362001)(33716001)(8936002)(2906002)(66476007)(6916009)(66556008)(8676002)(26005)(52116002)(38350700002)(38100700002)(9686003)(6512007)(54906003)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QFVHQJDKWr9ePvzC5L8QWku8kAxwx541Az5xYLKFrcbLGQavzX/0jzUF/3eXyndTrL/rFgqylEc/jfaN5//CRN+cbvuiu8BI0VLLV3y7uaexdtVlPgO2GPjzmTVaAjRZ8foEFiIzbDnlsVKglozPlGOKj8sgFNyEH5cNEv7EkC+GoV2CV0dFuJrIsuwTBAk60JTm//56klDt9Xg2SX0xdYZWNcSBhGADM2Pa34Zw0b+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i8X6+pAz07wFcFjf/Pjwtqp7yq/5UBmOLiOiETjZTOtJqocQjKgOu8kl3bhPG96GzGkvKnmt0zQqZXhDZ81Od1rar+jci/Kdd+V0MT8jDHIseL1t1ZkzcvfJJ1kTNlrgVXw51e8EGas+0Ox+CblNfloGyVzCDX2byDTr7sJdQ0Hop/ZVeAvftSNwul+Ob5zantTmXkUXRyPNmn2W7+e1Cn7WzSG3utTbfJBUYnS1B8meY5beOoj3lxBVeRC78sS5Lm+Gb0/S6BO4MfZZpVbEVCMWUFkXM7Qx22p8ZXTqNND8Sv8MPEx8z3B93Yb/ivmXoOyqKmfACwIdxfyhhn30XgZtEDYPb631Z/8rYAz0KJCJXFsv0qg4xBes6gDZs00LlzTtwZvu/3UGK+mthriDTvXQ08tTRU6KUKhBfdFH9AJKGZ/dSd7mlO7mdJk9I= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 22f62dc1-7aff-4eeb-0616-08da42d73a5c X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2365.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2022 07:28:59.2263 (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: 0A7g5cUZmPsc6ibpMimEdcEeMN2cHbH6c4Fff7ywVXvdOmY/nTPOLcfQZCDDk/FrzRp6R26MEewR8UmqFBCa6J7Ibyq/XfNviMNvyWPnpd8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1001MB2204 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517,18.0.874 definitions=2022-05-31_02:2022-05-30,2022-05-31 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 spamscore=0 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2205310037 X-Proofpoint-GUID: CNanChqPpTc25HsLG9Cu71QmIARoxT37 X-Proofpoint-ORIG-GUID: CNanChqPpTc25HsLG9Cu71QmIARoxT37 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org The is_valid_offset() function returns success/true if the call to validate_and_get_cpt_blkaddr() fails. Fixes: ecad2ce8c48f ("octeontx2-af: cn10k: Add mailbox to configure reassembly timeout") Signed-off-by: Dan Carpenter --- drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c index a79201a9a6f0..a9da85e418a4 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c @@ -579,7 +579,7 @@ static bool is_valid_offset(struct rvu *rvu, struct cpt_rd_wr_reg_msg *req) blkaddr = validate_and_get_cpt_blkaddr(req->blkaddr); if (blkaddr < 0) - return blkaddr; + return false; /* Registers that can be accessed from PF/VF */ if ((offset & 0xFF000) == CPT_AF_LFX_CTL(0) ||