rtc: sunplus: fix format string for printing resource
Arnd Bergmann authored
On 32-bit architectures with 64-bit resource_size_t, sp_rtc_probe()
causes a compiler warning:

drivers/rtc/rtc-sunplus.c: In function 'sp_rtc_probe':
drivers/rtc/rtc-sunplus.c:243:33: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=]
  243 |         dev_dbg(&plat_dev->dev, "res = 0x%x, reg_base = 0x%lx\n",
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The best way to print a resource is the special %pR format string,
and similarly to print a pointer we can use %p and avoid the cast.

Fixes: fad6cbe9

 ("rtc: Add driver for RTC in Sunplus SP7021")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230117172450.2938962-1-arnd@kernel.org

Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
08279468
Name Last commit Last update
Documentation dt-bindings: rtc: qcom-pm8xxx: allow 'wakeup-source' property
LICENSES LICENSES: Add the copyleft-next-0.3.1 license
arch treewide: Convert del_timer*() to timer_shutdown*()
block treewide: Convert del_timer*() to timer_shutdown*()
certs certs: make system keyring depend on built-in x509 parser
crypto Merge tag 'v6.2-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
drivers rtc: sunplus: fix format string for printing resource
fs treewide: Convert del_timer*() to timer_shutdown*()
include rtc: efi: Enable SET/GET WAKEUP services as optional
init Merge tag 'kbuild-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
io_uring io_uring/net: fix cleanup after recycle
ipc Merge tag 'mm-nonmm-stable-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
kernel Merge tag 'hardening-v6.2-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
lib test_maple_tree: add test for mas_spanning_rebalance() on insufficient data
mm hugetlb: really allocate vma lock for all sharable vmas
net treewide: Convert del_timer*() to timer_shutdown*()
rust rust: types: add `Opaque` type
samples Merge tag 'char-misc-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
scripts Merge tag 'coccinelle-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux
security Merge tag 'hardening-v6.2-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
sound treewide: Convert del_timer*() to timer_shutdown*()
tools Merge tag 'perf-tools-for-v6.2-2-2022-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
usr usr/gen_init_cpio.c: remove unnecessary -1 values from int file
virt Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
.clang-format Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.