Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1275386rdb; Fri, 19 Jan 2024 13:57:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IFjOSV/vUCHSBBNAPsYsS/xcMZK6FvkUKKJXqYyUMoWrr27N+mux/IVmFCL39XgAgYMHnNY X-Received: by 2002:a05:6214:d8d:b0:67f:3930:e33c with SMTP id e13-20020a0562140d8d00b0067f3930e33cmr673482qve.106.1705701466197; Fri, 19 Jan 2024 13:57:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705701466; cv=pass; d=google.com; s=arc-20160816; b=utPg4YUVP7Ab3T0VXElERPdjJPH7dPyPpkXseAsqZGEnE6EkcJsN1aaRbWp4/ehybd nS8ymJhjToBsSmbShaRsFky13MdzxrVVgk311m9bOLlvhv0C77sp5rSJNzGAa+5jpK3q i6LLwrG7J7OKT0IUmzqMeFt6GgamhfOONPbq3oroF8O0a6WDkwr/HE8zQOhVHUvNN3yk ZsiRki7WuNCwQNkTwQGeqO8WtaNwJEzaTbv2BkZPdl2FBWqPMZYwnsPLYnMQ/2u1klQa Vn/iRkxp3tkTssy+VvXK4LQqwK+4SXagsfbZbeUDI/x7zQpo0MFedYtv5CUcOHXpr+U8 Vpxw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:cc:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject :dkim-signature; bh=VVF/DXNkQrk84cprN3UAoU1BvvHEzT7JQOwOJshC+cA=; fh=+lrdiMmOLccyXl3uDT9OKZ1nyHhaNtXygqPKR0mNSjw=; b=v36WZdq9gk9IPY7/Kupxo3EkFEVKuJHG2MV8lvQqnWvnhSsf/2BgGMlXWXoVjzh/Tn ei8an3EQdoFMF9RKG6n319CcuXa89eO66CMBacskR5r0C05I5avuw8p7h3AUBX+Kef4z xC9ose3IqrzxvRgNSwuCR5NjJ6iB0Cki2OyhvFH9Qe97TNUxOLYaawRxZQWl9THjRHdU wR1Yzv60aGK115rMl9Olv8+MeMFpyID2jFZ9ccjMtn9JUirBrERuwvGQTk3WIIy5X6NV 69992zJDs9epiuERWY1QNMB1clWtrs8XOtSPXimH3tIasqLGgyKkHhKRYkriyUowIC+6 sWmA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="BI4Um1/S"; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-31595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31595-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y4-20020a0ce044000000b006852c2090bdsi152204qvk.485.2024.01.19.13.57.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 13:57:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="BI4Um1/S"; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-31595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31595-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DB8641C2380E for ; Fri, 19 Jan 2024 21:57:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B76B458AA5; Fri, 19 Jan 2024 21:57:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="BI4Um1/S" Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D41F56745 for ; Fri, 19 Jan 2024 21:57:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705701457; cv=none; b=GRnvpwqc/nbg+YMSb3HxDUGAOOiAS2m79D+RUDlvx6EhjtoYtoRCzNn4QzjT5gSab7flGArP1yeN0JMzKou2rdiKjH9zSCrC+zBZ1+MiWI5Rsn9VExfv9FOEw8sFV1vWD5YJ2xC0IZiS/FlYDcwBZLbiHK0Vw7nRHjjPPvZsiiM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705701457; c=relaxed/simple; bh=1uabMeCQFCqnSjbynu1nSiZj2Z/+KuVO23AFzHnc5p4=; h=Subject:Date:Message-ID:MIME-Version:Cc:From:To; b=aS8gakJJQZoGMSq6oetG81E+0hwq4nDly2qzaFcIL7Y3FgQZD8xBD+zumDNcOsm0vwPzOBF16UFNvOkTapi5O/lZU41jQ+GdO3M7WuypG3SPQPPGAepwASZviWT21a4mWYNLxRNXLx+qQjKNrCA4T/HPlvM3AztFumq3VmybtWs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=BI4Um1/S; arc=none smtp.client-ip=209.85.216.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-28be8ebcdc1so1033170a91.0 for ; Fri, 19 Jan 2024 13:57:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1705701455; x=1706306255; darn=vger.kernel.org; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:from:to:cc:subject:date:message-id:reply-to; bh=VVF/DXNkQrk84cprN3UAoU1BvvHEzT7JQOwOJshC+cA=; b=BI4Um1/StUQuP3okNZdHvigasCxKzIL7AonJZR7XacpA8XDsShyHm0Y5Lzfp5wbspg 6gs27oWsPpKitdr/CHc5jXM2T9nNCEBavk5aJdUdLDy5Dkxp25EfBIaPWYbu2beez3BF 7GINq5MfDOdcq2bduCWT+kkbRuM8XUqsjQYd/OuYekvqtr3vBBIxI5wYsaghyZigO/Pt W9aIyR8YSs0WAQiveA4ZC/wYAxF3GeAEspa7+5cotXJDxorll2gPS/TrH0SvcKkFmSZS tjXntR1te9ZkrhX8uhDtRV4mR9ZTStbTbucEiy7HPb3O3miu/YyYHMTfhiOTBRRBbITE kr4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705701455; x=1706306255; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VVF/DXNkQrk84cprN3UAoU1BvvHEzT7JQOwOJshC+cA=; b=gaWdMjsytxm9grUPUC1Kr2S/S6Em4Obm1imjtY9XsHVgr+0a2lLOhL4jgVZeGMsr46 /HANpW/9B3UxXHx8HuCMIPmeMKrh5r/leuQ1We8e+ohgHywOS+XmqiVj4jkzOuSRG/SI Qo9LWU7OVLayTg6VL8vvurTdszJPOsZ0+DIzZzqE+T24+WNyeemkNHjMsFYXZ/mtmew9 n/ViWhi1KXrCTlRapWts/D9T/Pi279IU+3x8zHFQUulOtTVJf/gKmOV/YnqGw54ILvmv F+ElLkw21pxvjVuFIj8qKOWIoZzWxXtZut3XreEHV8+/jS9IMOMIxbxd7ETo5FvmFZfg fEcQ== X-Gm-Message-State: AOJu0YzLxYjAWHZzuduAx3hwaJ5JW9kfy/sAtbkg7jNW/kwt5RZHW/B0 qNFGrW84n1dWT/AtJYmgI4NyC8clK0VioMHD5VBmKo5Eq1bw3rw6tC38+JS+OaM= X-Received: by 2002:a17:90a:e547:b0:290:4140:1e43 with SMTP id ei7-20020a17090ae54700b0029041401e43mr396975pjb.80.1705701455437; Fri, 19 Jan 2024 13:57:35 -0800 (PST) Received: from localhost ([192.184.165.199]) by smtp.gmail.com with ESMTPSA id db11-20020a17090ad64b00b002900eeada1asm4592473pjb.43.2024.01.19.13.57.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 13:57:35 -0800 (PST) Subject: [PATCH] tty: hvc: Fix the RISC-V SBI driver for a refactoring Date: Fri, 19 Jan 2024 13:56:13 -0800 Message-ID: <20240119215612.20529-2-palmer@rivosinc.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Greg KH , jirislaby@kernel.org, Paul Walmsley , Palmer Dabbelt , aou@eecs.berkeley.edu, ajones@ventanamicro.com, Atish Patra , apatel@ventanamicro.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-riscv@lists.infradead.org, Palmer Dabbelt From: Palmer Dabbelt To: linux-riscv@lists.infradead.org From: Palmer Dabbelt I missed the int->size_t refactoring in f32fcbedbe92 ("tty: hvc: convert to u8 and size_t"), which causes the newly used ops in 88ead68e764c ("tty: Add SBI debug console support to HVC SBI driver") to fail to build due to a linux/drivers/tty/hvc/hvc_riscv_sbi.c:59:15: error: incompatible function pointer types initializing 'ssize_t (*)(uint32_t, const u8 *, size_t)' (aka 'long (*)(unsigned int, const unsigned char *, unsigned long)') with an expression of type 'int (uint32_t, const char *, int)' (aka 'int (unsigned int, const char *, int)') [-Wincompatible-function-pointer-types] .put_chars = hvc_sbi_dbcn_tty_put, Fixes: f32fcbedbe92 ("tty: hvc: convert to u8 and size_t") Fixes: 88ead68e764c ("tty: Add SBI debug console support to HVC SBI driver") Signed-off-by: Palmer Dabbelt --- I now remember Anup pointing this one out, but looks like I forgot about it. --- drivers/tty/hvc/hvc_riscv_sbi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/hvc/hvc_riscv_sbi.c b/drivers/tty/hvc/hvc_riscv_sbi.c index 2f3571f17ecd..c08718be8e73 100644 --- a/drivers/tty/hvc/hvc_riscv_sbi.c +++ b/drivers/tty/hvc/hvc_riscv_sbi.c @@ -15,7 +15,7 @@ #include "hvc_console.h" -static int hvc_sbi_tty_put(uint32_t vtermno, const char *buf, int count) +static size_t hvc_sbi_tty_put(uint32_t vtermno, const char *buf, int count) { int i; @@ -25,7 +25,7 @@ static int hvc_sbi_tty_put(uint32_t vtermno, const char *buf, int count) return i; } -static int hvc_sbi_tty_get(uint32_t vtermno, char *buf, int count) +static size_t hvc_sbi_tty_get(uint32_t vtermno, char *buf, int count) { int i, c; -- 2.43.0