Browse Source

Merge pull request #170 in PROCESSOR-SDK/processor-sdk-linux from plsdk-2838 to processor-sdk-linux-4.19.y

* commit 'ab13039561a188d1029b94f19192abab8e978468':
  net: ethernet: ti: ptp_bc/iep: fix compiler warning
  watchdog: keystone_wdt: fix compiler warning
Muralidharan Karicheri 6 years ago
parent
commit
16bfb0cefc

+ 3 - 0
drivers/net/ethernet/ti/iep.c

@@ -1096,6 +1096,9 @@ int iep_register(struct iep *iep)
 					PTP_BC_CLOCK_TYPE_PRUICSS2);
 
 	pr_info("iep ptp bc clkid %d\n", iep->bc_clkid);
+	/* HACK: call the unused ptp_bc API to avoid compiler warning
+	 */
+	ptp_bc_mux_ctrl_register(NULL, NULL, NULL);
 	return 0;
 }
 

+ 5 - 3
drivers/net/ethernet/ti/ptp_bc.c

@@ -196,9 +196,11 @@ EXPORT_SYMBOL_GPL(ptp_bc_clock_unregister);
 void ptp_bc_mux_ctrl_register(void *ctx, spinlock_t *lock,
 			      ptp_bc_mux_ctrl_handle_t handler)
 {
-	bc_mux_ctrl_handler = handler;
-	bc_mux_ctrl_ctx = ctx;
-	bc_mux_lock = lock;
+	if (ctx && lock && handler) {
+		bc_mux_ctrl_handler = handler;
+		bc_mux_ctrl_ctx = ctx;
+		bc_mux_lock = lock;
+	}
 }
 EXPORT_SYMBOL_GPL(ptp_bc_mux_ctrl_register);
 

+ 1 - 1
drivers/watchdog/keystone_wdt.c

@@ -99,7 +99,7 @@ static int keystone_wdt_ping(struct watchdog_device *wdd)
 {
 	struct keystone_wdt_device *wdt = watchdog_get_drvdata(wdd);
 
-	pr_debug("%s, %x (%x): jiffies=%lu\n", __func__, wdt, wdt->base,
+	pr_debug("%s, %p (%p): jiffies=%lu\n", __func__, wdt, wdt->base,
 		 jiffies);
 
 	/* put watchdog in service state */