Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) # SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) # Sphinx has deprecated its older logging interface, but the replacement
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) # only goes back to 1.6.  So here's a wrapper layer to keep around for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) # as long as we support 1.4.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) import sphinx
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) if sphinx.__version__[:3] >= '1.6':
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)     UseLogging = True
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)     from sphinx.util import logging
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)     logger = logging.getLogger('kerneldoc')
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) else:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)     UseLogging = False
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) def warn(app, message):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)     if UseLogging:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)         logger.warning(message)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)     else:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)         app.warn(message)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) def verbose(app, message):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)     if UseLogging:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)         logger.verbose(message)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)     else:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)         app.verbose(message)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) def info(app, message):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)     if UseLogging:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)         logger.info(message)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)     else:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)         app.info(message)