Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp164806pxy; Sat, 31 Jul 2021 03:43:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtNVDSnIcbRgi7kYM4O5DySJnC3sSmR7SA6jTZjmB7Ro2s8X+Q7TZ0CQnNdRMf6SWqzbOm X-Received: by 2002:a05:6402:b4d:: with SMTP id bx13mr8403705edb.278.1627728196726; Sat, 31 Jul 2021 03:43:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627728196; cv=none; d=google.com; s=arc-20160816; b=GwRhQCyo7KJAUaA6RaYTPtCZwqT4dYzC1EJNORvTFGs81DecvihaObHEX9b/+dlRLb 0l6WQXySemXahWnL54R4byoQwSELr/Amz5SWyfwrKRVZvYLyYpuPicV7JMP4DzgL1OHh 3RdaEWUg67kSO/pNUN16+O2Rij5up8YArxT97F57oaQOPvssPtRMGpWHUiHqTvya/7BZ gUDTs5QJ52tPiHKRB/0yBegGHfUqi+FVsieL5xa4jrspZ1CBlq6k8hg+dEjf3/skVphP F7vKHE3ESxuqTCmg1Z673dC4H8juNAV3NIR7I5fz63KkLbrBqhPHrJTmAIy3FajPJyee cEvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=o+U3o6QPypHM8myGciC65ftfcWsTRmvUWvO/xmq1Pew=; b=mx/uDtRDmdQWx6lf4DHBhoQREjK3qoEVRv4lgcMxKocnfLAmdeDgdlKmkRU6O3YEgJ zZu6B6XnGgiIGuNipyNBXDiyn0XeU+eABa56jlcHm1TQuT7SHy4K2r1Rxgmyh4IbBNpi QZrUNOHM1t5fkJygDw195uyX79o/llO30zniRgcY/wkJnKXkMr3qXseyFDDw4WMEKxnK D3/Tmbh6bPb6fEQpflFCDOdlBzNAQJSbL969P2nNigMG6eQaxKddACO8z9UXo6e1TCNF K5IlAo/ncvJBF/jOJs22uB8mYhgrdxfQJhqROMcxBzLMryvA54EmoQGOtwzdKQ5ozgQz POtQ== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kk18si4306194ejc.34.2021.07.31.03.42.50; Sat, 31 Jul 2021 03:43:16 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232450AbhGaKlg (ORCPT + 99 others); Sat, 31 Jul 2021 06:41:36 -0400 Received: from h2.fbrelay.privateemail.com ([131.153.2.43]:43536 "EHLO h2.fbrelay.privateemail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232182AbhGaKlg (ORCPT ); Sat, 31 Jul 2021 06:41:36 -0400 Received: from MTA-10-4.privateemail.com (mta-10-1.privateemail.com [68.65.122.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by h1.fbrelay.privateemail.com (Postfix) with ESMTPS id 5B5CC800E0 for ; Sat, 31 Jul 2021 06:41:29 -0400 (EDT) Received: from mta-10.privateemail.com (localhost [127.0.0.1]) by mta-10.privateemail.com (Postfix) with ESMTP id 3F25918000B6; Sat, 31 Jul 2021 06:41:28 -0400 (EDT) Received: from localhost.localdomain (unknown [10.20.151.234]) by mta-10.privateemail.com (Postfix) with ESMTPA id E444518000AE; Sat, 31 Jul 2021 06:41:26 -0400 (EDT) From: Jordy Zomer To: linux-kernel@vger.kernel.org, linux1394-devel@lists.sourceforge.net Cc: Greg Kroah-Hartman , Jordy Zomer , Stefan Richter Subject: [PATCH] firewire: ohci: make reg_(read|write) unsigned Date: Sat, 31 Jul 2021 12:41:12 +0200 Message-Id: <20210731104112.512449-1-jordy@pwning.systems> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The reg_(read|write) functions used to take a signed integer as an offset parameter. The callers of this function only pass an unsigned integer to it. Therefore to make it obviously safe, let's just make this an unsgined integer as this is used in pointer arithmetics. Signed-off-by: Jordy Zomer --- drivers/firewire/ohci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 17c9d825188b..0119aa9cbc7c 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -524,12 +524,12 @@ static void log_ar_at_event(struct fw_ohci *ohci, } } -static inline void reg_write(const struct fw_ohci *ohci, int offset, u32 data) +static inline void reg_write(const struct fw_ohci *ohci, u32 offset, u32 data) { writel(data, ohci->registers + offset); } -static inline u32 reg_read(const struct fw_ohci *ohci, int offset) +static inline u32 reg_read(const struct fw_ohci *ohci, u32 offset) { return readl(ohci->registers + offset); } -- 2.27.0