Call same function using 2 different arguments

I have a script that uses 2 arguments. I want to call the function part within this script using these same arguments. Below is what I came up with below script so far, any guidance would be helpful. Thank you!

cat backup.sh
#!/bin/bash

function usage {
	  echo "USAGE: $(basename $0) <host1> <host2>"
	  exit 1
}

function backup_run () {
ssh -q <host> "test -x /tmp/abc"
if [ $? -eq 0 ]; then
	echo  "ssh -q <host> /tmp/abc"
fi
}

if [[.....]]; then
	backup_run <host1>
else
	backup_run <host2>
fi

What exactly do you want to achieve that above doesn't deliver? What problems do you run into? Errors? Messages?

Kindly excuse my first post. Here is my actual script and I looked around to see if I could edit the first post. I'm trying to find how to pass 2 arguments to the script which in turn passes those 2 arguments to the function. I can make it work for one argument using $1 within the function.

#./backup.sh <host1> <host2>
# cat backup.sh
#!/bin/bash

function usage {
	  echo "USAGE: $(basename $0) <host1> <host2>"
	  exit 1
}
if [[ $# != 2 ]]; then
  usage
fi

function backup_run () {
SITE=$(ssh -q $HOST cat /serverinfo | awk '{print $2}' 2>/dev/null)
echo $SITE
HOST=$(ssh -q $HOST hostname|cut -c1,2,3,4 >/dev/null)
echo $HOST

#Setting SITE based on region
case $SITE in
  AAA)
    region="AAA"
    ;;
  BBB)
    region="BBB"
    ;;
  *)
    echo "FAIL: Incorrect region"
    exit 1
    ;;
esac

#OS Version
REL=$(ssh -q $HOST rpm -q redhat-release-server 2>/dev/null)

# Print KEY value based on host, site and os version
if [[ ${HOST} == "PROD" ]]; then
  KEY="${SITE} NEW ${REL}"
else
  KEY="${SITE} OLD ${REL}"
fi
}

backup_run <host1>
backup_run <host2>

use "$@" (= all parameters, quoted). There is a lot further interesting to know about parameters. see man bash

So you succeeded, calling backup_run $1 ? And your next step would be backup_run $2 , then? How about for looping across all positional parameters, using $@ as proposed by stomp?

There are several ways to tackle this (looping through the arguments)

while [ $# -gt 0 ]
do
     backup_run "$1"
     shift
done

The above uses shift which throws away each $1 argument after it's used.

Or these solutions leave the positional arguments alone and simply loop thru them:

for arg
do
    backup_run "$arg"
done

for arg in "$@"
do
    backup_run "$arg"
done

for((pos=1 ; pos <= $# ; pos++))
do
    backup_run "${!pos}"
done

edit: I have updated to allow calling the script with arguments that contain white space

Thank you for all the responses.
I tested using for loop which worked out well and ended up using backup_run $1 followed by backup_run $2 as I had to call function for each argument at 2 different locations within the script.