tty: srmcons: use 'count' directly in srmcons_do_write()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Mon, 27 Nov 2023 12:37:11 +0000 (13:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 19:17:06 +0000 (19:17 +0000)
commitad1885559249fa2530cb0659b758583873dc906f
tree294a053d10794ce36c425744ed99d1f461beed08
parentff4b8c3a8be98fee16a8ab7751a5834088e60b23
tty: srmcons: use 'count' directly in srmcons_do_write()

Similarly to 'buf' in the previous patch, there is no need to have a
separate counter ('remaining') in srmcons_do_write(). 'count' can be
used directly which simplifies the code a bit.

Note that the type of the current count ('c') is changed from 'long' to
'size_t' so that:
1) it is prepared for the upcoming change of 'count's type, and
2) is unsigned.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: linux-alpha@vger.kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20231127123713.14504-3-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/alpha/kernel/srmcons.c