Clean up many C99 integer types format specifiers
[fw/openocd] / src / target / adi_v5_swd.c
index 5a3570d536f457734f084fcbb0e408ef78c9afa0..027e06696c4a31c8e448566255904e1d3c54895f 100644 (file)
@@ -15,7 +15,7 @@
  *   You should have received a copy of the GNU General Public License
  *   along with this program; if not, write to the
  *   Free Software Foundation, Inc.,
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  ***************************************************************************/
 
 /**
 
 #include <jtag/swd.h>
 
-
-
 static int swd_queue_dp_read(struct adiv5_dap *dap, unsigned reg,
                uint32_t *data)
 {
-       // REVISIT status return vs ack ...
+       /* REVISIT status return vs ack ... */
        return swd->read_reg(swd_cmd(true,  false, reg), data);
 }
 
@@ -71,14 +69,14 @@ static int swd_queue_idcode_read(struct adiv5_dap *dap,
        if (status < 0)
                return status;
        *ack = status;
-       // ??
+       /* ?? */
        return ERROR_OK;
 }
 
 static int (swd_queue_dp_write)(struct adiv5_dap *dap, unsigned reg,
                uint32_t data)
 {
-       // REVISIT status return vs ack ...
+       /* REVISIT status return vs ack ... */
        return swd->write_reg(swd_cmd(false,  false, reg), data);
 }
 
@@ -86,16 +84,16 @@ static int (swd_queue_dp_write)(struct adiv5_dap *dap, unsigned reg,
 static int (swd_queue_ap_read)(struct adiv5_dap *dap, unsigned reg,
                uint32_t *data)
 {
-       // REVISIT  APSEL ...
-       // REVISIT status return ...
+       /* REVISIT  APSEL ... */
+       /* REVISIT status return ... */
        return swd->read_reg(swd_cmd(true,  true, reg), data);
 }
 
 static int (swd_queue_ap_write)(struct adiv5_dap *dap, unsigned reg,
                uint32_t data)
 {
-       // REVISIT  APSEL ...
-       // REVISIT status return ...
+       /* REVISIT  APSEL ... */
+       /* REVISIT status return ... */
        return swd->write_reg(swd_cmd(false,  true, reg), data);
 }
 
@@ -194,15 +192,14 @@ COMMAND_HANDLER(handle_swd_wcr)
        int retval;
        struct target *target = get_current_target(CMD_CTX);
        struct arm *arm = target_to_arm(target);
-struct adiv5_dap *dap = arm->dap;
+       struct adiv5_dap *dap = arm->dap;
        uint32_t wcr;
        unsigned trn, scale = 0;
 
-
        switch (CMD_ARGC) {
        /* no-args: just dump state */
        case 0:
-               //retval = swd_queue_dp_read(dap, DP_WCR, &wcr);
+               /*retval = swd_queue_dp_read(dap, DP_WCR, &wcr); */
                retval = dap_queue_dp_read(dap, DP_WCR, &wcr);
                if (retval == ERROR_OK)
                        dap->ops->run(dap);
@@ -212,7 +209,7 @@ struct adiv5_dap *dap = arm->dap;
                }
 
                command_print(CMD_CTX,
-                       "turnaround=%d, prescale=%d",
+                       "turnaround=%" PRIu32 ", prescale=%" PRIu32,
                        WCR_TO_TRN(wcr),
                        WCR_TO_PRESCALE(wcr));
        return ERROR_OK;
@@ -315,11 +312,10 @@ static int swd_init(struct command_context *ctx)
 {
        struct target *target = get_current_target(ctx);
        struct arm *arm = target_to_arm(target);
-struct adiv5_dap *dap = arm->dap;
+       struct adiv5_dap *dap = arm->dap;
        uint32_t idcode;
        int status;
 
-
        /* FIXME validate transport config ... is the
         * configured DAP present (check IDCODE)?
         * Is *only* one DAP configured?
@@ -334,7 +330,7 @@ struct adiv5_dap *dap = arm->dap;
        status = swd_queue_idcode_read(dap, &ack, &idcode);
 
        if (status == ERROR_OK)
-               LOG_INFO("SWD IDCODE %#8.8x", idcode);
+               LOG_INFO("SWD IDCODE %#8.8" PRIx32, idcode);
 
        return status;