hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/gpu/ipu-v3/ipu-di.c
....@@ -1,16 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (c) 2010 Sascha Hauer <s.hauer@pengutronix.de>
34 * Copyright (C) 2005-2009 Freescale Semiconductor, Inc.
4
- *
5
- * This program is free software; you can redistribute it and/or modify it
6
- * under the terms of the GNU General Public License as published by the
7
- * Free Software Foundation; either version 2 of the License, or (at your
8
- * option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful, but
11
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13
- * for more details.
145 */
156 #include <linux/export.h>
167 #include <linux/module.h>
....@@ -460,8 +451,9 @@
460451
461452 error = rate / (sig->mode.pixelclock / 1000);
462453
463
- dev_dbg(di->ipu->dev, " IPU clock can give %lu with divider %u, error %d.%u%%\n",
464
- rate, div, (signed)(error - 1000) / 10, error % 10);
454
+ dev_dbg(di->ipu->dev, " IPU clock can give %lu with divider %u, error %c%d.%d%%\n",
455
+ rate, div, error < 1000 ? '-' : '+',
456
+ abs(error - 1000) / 10, abs(error - 1000) % 10);
465457
466458 /* Allow a 1% error */
467459 if (error < 1010 && error >= 990) {